Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
docs(README): document create method on factories
Browse files Browse the repository at this point in the history
  • Loading branch information
terinjokes committed May 9, 2016
1 parent 4b911d3 commit 2bd1445
Showing 1 changed file with 34 additions and 2 deletions.
36 changes: 34 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,21 @@ var client = new CFClient({
* *API Reference*: [Zone properties](https://api.cloudflare.com/#zone-properties)

A normalized representation of a CloudFlare Zone. Properties that were
`snake_cased` have been changed to be `camelCased`.
`snake_cased` have been aliased to `camelCased`. TODO: document all the known
properties.

#### `Zone.create(properties): Zone`

* properties: The properties to set on the new `Zone` object.
* *Returns*: A new `Zone` object.

Creates a new `Zone` object with the provided properties. The returned object
can be used with the below methods that accept a `Zone` object.

#### `Zone.is(z): boolean`

* z: The other object that may, or may not, be a `Zone` object.
* *Returns*: `true` if the parameter is a `Zone` object, otherwise `false`.

#### `browseZones([query, [options]): Promise<PaginatedResponse<Zone[]>>`

Expand Down Expand Up @@ -114,7 +128,20 @@ The CloudFlare API client makes it easy to manage DNS records for domains on Clo
* *API Reference*: [DNS Records for a Zone](https://api.cloudflare.com/#dns-records-for-a-zone-properties)

A normalized representation of a CloudFlare DNS Record type. Properties that
were `snake_cased` have been changed to be `camelCased`.
were `snake_cased` have been aliased to be `camelCased`.

#### `DNSRecord.create(properties): DNSRecord`

* properties: The properties to set on the new `DNSRecord` object.
* *Returns*: A new `DNSRecord` object.

Creates a new `DNSRecord` object with the provided properties. The returned
object can be used with the below methods that accept a `DNSRecord` object.

#### `DNSRecord.is(rr): boolean`

* rr: The other object that may, or may not, be a `DNSRecord` object.
* *Returns*: `true` if the parameter is a `DNSRecord` object, otherwise `false`.

#### `browseDNS(z, [query, [options]]): Promise<PaginatedResponse<DNSRecord[]>>`

Expand Down Expand Up @@ -183,6 +210,11 @@ IPRanges{
}
```

#### `IPRanges.is(ip): boolean`

* ip: The other object that may, or may not, be an `IPRanges` object.
* *Returns*: `true` if the parameter is a `IPRanges` object, otherwise `false`.

#### `readIPs(): Promise<IPRanges>`

* *Returns*: A Promise that resolves to `IPRanges`
Expand Down

0 comments on commit 2bd1445

Please sign in to comment.