Skip to content
This repository has been archived by the owner on Oct 10, 2022. It is now read-only.

Commit

Permalink
Merge pull request #3 from tobiaslins/patch-1
Browse files Browse the repository at this point in the history
uniform readme
  • Loading branch information
biilmann authored Oct 3, 2016
2 parents e793501 + 9dfb66d commit 2b08ffc
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ site.destroy().then(function() {
Pagination and Rate Limits
==========================

Any collection returned by the client will have a meta attribute that lets you check pagination and rate limit values.
Any collection returned by the client will have a meta attribute that lets you check pagination and rate limit values:

```js
client.sites().then(function(sites) {
Expand Down Expand Up @@ -208,7 +208,7 @@ client.submissions().then(function(submissions) {
});
```

Access submissions from a specific site
Access submissions from a specific site:

```js
client.site(id).then(function(site) {
Expand All @@ -218,7 +218,7 @@ client.site(id).then(function(site) {
});
```

Access submissions from a specific form
Access submissions from a specific form:

```js
client.form(id).then(function(form) {
Expand All @@ -228,7 +228,7 @@ client.form(id).then(function(form) {
});
```

Get a specific submission
Get a specific submission:

```js
client.submission(id).then(function(submission) {
Expand Down Expand Up @@ -262,15 +262,15 @@ client.site(id).then(function(site) {
Deploys
=======

Access all deploys for a site
Access all deploys for a site:

```js
site.deploys().then(function(deploys) {
// do work
});
```

Access a specific deploy
Access a specific deploy:

```js
site.deploy(id).then(function(deploy) {
Expand All @@ -294,7 +294,7 @@ site.createDeploy({dir: "/path/to/folder", draft: true}).then(function(deploy) {
})
```

Publish a deploy (makes it the current live version of the site)
Publish a deploy (makes it the current live version of the site):

```js
site.deploy(id).then(function(deploy) {
Expand All @@ -318,7 +318,7 @@ client.site(id).then(function(site) {
});
```

Get a specific snippet
Get a specific snippet:

```js
client.site(id).then(function(site) {
Expand Down Expand Up @@ -346,7 +346,7 @@ client.site(id).then(function(site) {
});
```

Update a snippet
Update a snippet:

```js
snippet.update({
Expand All @@ -360,7 +360,7 @@ snippet.update({
});
```

Delete a snippet
Delete a snippet:

```js
snippet.destroy().then(function() {
Expand All @@ -373,31 +373,31 @@ Users

The user methods are mainly useful for resellers. Creating, deleting and updating users are limited to resellers.

Getting a list of users
Getting a list of users:

```js
client.users().then(function(users) {
// do work
});
```

Getting a specific user
Getting a specific user:

```js
client.user(id).then(function(user) {
// do work
});
```

Creating a new user (`email` is required, `uid` is optional. Both must be unique)
Creating a new user (`email` is required, `uid` is optional. Both must be unique):

```js
client.createUser({email: "user@example.com", uid: "12345"}).then(function(user) {
console.log(user);
});
```

Updating a user
Updating a user:

```js
client.user(id).then(function(user) {
Expand All @@ -407,7 +407,7 @@ client.user(id).then(function(user) {
});
```

Deleting a user
Deleting a user:

```js
client.user(id).then(function(user) {
Expand All @@ -417,7 +417,7 @@ client.user(id).then(function(user) {
});
```

Getting sites belonging to a user
Getting sites belonging to a user:

```js
client.user(id).then(function(user) {
Expand Down Expand Up @@ -448,15 +448,15 @@ client.dnsZone(id).then(function(zone) {
});
```

Creating a new zone
Creating a new zone:

```js
client.createDnsZone({name: "example.com"}).then(function(zone) {
console.log(zone);
});
```

Deleting a zone
Deleting a zone:

```js
client.dnsZone(id).then(function(zone) {
Expand All @@ -466,23 +466,23 @@ client.dnsZone(id).then(function(zone) {
});
```

Getting records for a zone
Getting records for a zone:

```js
zone.records().then(function(records) {
console.log(records);
});
```

Getting a specific record
Getting a specific record:

```js
zone.record(id).then(function(record) {
console.log(record);
});
```

Adding a new record (supported types: A, CNAME, TXT, MX)
Adding a new record (supported types: A, CNAME, TXT, MX):

```js
zone.createRecord({
Expand All @@ -495,7 +495,7 @@ zone.createRecord({
});
```

Deleting a record
Deleting a record:

```js
record.destroy().then(function() {
Expand Down

0 comments on commit 2b08ffc

Please sign in to comment.