Skip to content

Commit

Permalink
Merge pull request #4 from ajp8164/master
Browse files Browse the repository at this point in the history
Update documentation.
  • Loading branch information
Andy Phillipson authored Aug 2, 2016
2 parents 01e58ce + afd25e5 commit 71eeb95
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.header.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This package communicates with [BitPay](https://bitpay.com/api) using REST. All

## Get Started

You can start using bitpay-pubiciclient in any of these ways:
You can start using bitpay-public-client in any of these ways:

* via [Bower](http://bower.io/): by running `bower install bitpay-public-client` from your console
* or via [NPM](https://www.npmjs.com/package/bitpay-public-client): by running `npm install bitpay-public-client` from your console.
Expand Down
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This package communicates with [BitPay](https://bitpay.com/api) using the BitPay

## Get Started

You can start using bitpay-pubiciclient in any of these ways:
You can start using bitpay-public-client in any of these ways:

* via [Bower](http://bower.io/): by running `bower install bitpay-public-client` from your console
* or via [NPM](https://www.npmjs.com/package/bitpay-public-client): by running `npm install bitpay-public-client` from your console.
Expand All @@ -30,6 +30,32 @@ npm i bitpay-public-client
## Class: API
ClientAPI constructor.

### API.createInvoice(opts, callback)

Create a new invoice. See https://bitpay.com/api#resource-Invoices.

**Returns**

On success:

- `Object` the new invoice data.

**Parameters**

Parameter | Type | Default | Description
--------- | ---- | ------- | -----------
`opts` | `Object` | `{}` | An object describing relevant specific options.
`callback` | `Object` | `{}` | Function called when request is complete.

All required option attributes are described below. See https://bitpay.com/api#resource-Invoices for additional options.

Attribute | Type | Default | Description
--------- | ---- | ------- | -----------
`opts.token` | `string` | | A BitPay API token.
`opts.guid` | `string` | | A unique id.
`opts.currency` | `string` | | ISO 4217 3-character currency code.
`opts.price` | `string` | | The amount (in the specified currency) for which the invoice should be created.

### API.getRates(opts, callback)

Retrieves exchange rates. Rates are exchange rates, representing the number of fiat currency units equivalent to one BTC. See https://bitpay.com/bitcoin-exchange-rates.
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bitpay-public-client",
"main": "index.js",
"version": "1.1.0",
"version": "1.1.1",
"homepage": "https://github.com/bitpay/bitpay-public-client",
"authors": ["BitPay Inc"],
"description": "Client for public facade of BitPay API",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "bitpay-public-client",
"description": "Client for public facade of BitPay API",
"author": "BitPay Inc",
"version": "1.1.0",
"version": "1.1.1",
"license": "MIT",
"keywords": [
"bitcoin",
Expand Down

0 comments on commit 71eeb95

Please sign in to comment.