<commit_before># gyft

## Client for accessing the Gyft API

## Install

```bash
$ npm install --save gyft
```

## Test

```bash
$ npm test
```

## Example

```js
var Gyft = require('gyft')
var gyft = Gyft({
  apiKey: 'blah'
, secret: 'blah'
})

gyft.listCards(function(err, cards) {
  if (err) throw err // error should be handled, not thrown
  console.log(cards)
  // => [ { id: <card id>
  // =>   , merchant_id: <merchant id>
  // =>   , merchant_name: <merchant name>
  // =>   , card_currency_code: 'USD'
  // =>   , opening_balance: 100
  // =>   , merchant_icon_image_url_hd: 'http://...'
  // =>   , cover_image_url_hd: 'http://...'
  // =>   } ]
})
```

## Usage

### Gyft(opts)

`opts` must contain both an `apiKey` and `secret` property. It may also
contain a `url` property. The url will be the API url to use to access
the Gyft API.  It currently defaults to the sandbox (this will change once the
package hits 1.x)


#### Gyft.prototype.listCards(Object:opts, cb)

`opts` can contain a `format` property that will format the results into an object.
<commit_msg>remove notes in docs about sandbox url being default<commit_after># gyft

## Client for accessing the Gyft API

## Install

```bash
$ npm install --save gyft
```

## Test

```bash
$ npm test
```

## Example

```js
var Gyft = require('gyft')
var gyft = Gyft({
  apiKey: 'blah'
, secret: 'blah'
})

gyft.listCards(function(err, cards) {
  if (err) throw err // error should be handled, not thrown
  console.log(cards)
  // => [ { id: <card id>
  // =>   , merchant_id: <merchant id>
  // =>   , merchant_name: <merchant name>
  // =>   , card_currency_code: 'USD'
  // =>   , opening_balance: 100
  // =>   , merchant_icon_image_url_hd: 'http://...'
  // =>   , cover_image_url_hd: 'http://...'
  // =>   } ]
})
```

## Usage

### Gyft(opts)

`opts` must contain both an `apiKey` and `secret` property. It may also
contain a `url` property. The url will be the API url to use to access
the Gyft API.


#### Gyft.prototype.listCards(Object:opts, cb)

`opts` can contain a `format` property that will format the results into an object.

{'fraction_non_alphanumeric': 0.16555977229601518, 'fraction_numerical': 0.003320683111954459, 'mean_word_length': 3.1597633136094676, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1230883', 'n_tokens_mistral': 777, 'n_tokens_neox': 740, 'n_words': 238}