Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Commit

Permalink
Update README for v2
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Jun 30, 2016
1 parent 72b886d commit 608b1f0
Showing 1 changed file with 6 additions and 21 deletions.
27 changes: 6 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ Development section below.

## Documentation

For now ocumentation for widgets API is present in JSDoc comments,
For now documentation for widgets API is present in JSDoc comments,
but not generated into more readable format.

Configuration options:
- `window.grtpAPI` - Where to look for the grtp.co API
- defaults to `//grtp.co/v1/`
- defaults to `//grtp.co/v2/`
- `window.gratipayURI` - Where to look for Gratipay
- defaults to `https://gratipay.com/`

Expand All @@ -41,31 +41,16 @@ In the following examples, just switch out `rummik` with your Gratipay username.
![](https://cloud.githubusercontent.com/assets/134455/4095888/3e6d7758-2fba-11e4-935f-14e30c32ac1e.png)
```html
<script data-gratipay-username="rummik"
src="//grtp.co/v1.js" async></script>
```

![](https://cloud.githubusercontent.com/assets/134455/4095889/3fb3b5f0-2fba-11e4-8adb-250a0dc4e9cf.png)
```html
<script data-gratipay-username="rummik"
data-gratipay-widget="button"
src="//grtp.co/v1.js" async></script>
```

![](https://cloud.githubusercontent.com/assets/134455/4095908/997bc05a-2fba-11e4-99cb-56ad9cbad392.png)
```html
<script data-gratipay-username="rummik"
data-gratipay-widget="giving"
src="//grtp.co/v1.js" async></script>
src="//grtp.co/v2.js" async></script>
```

### Custom Widgets
You can create your own widgets by adding `data-gratipay-widget="custom"` to your
widget's HTML, and the following classes:

- Text
- `gratipay-teamslug` - the Team's slug
- `gratipay-receiving` - dollar-sign prefixed value of `receiving`
- `gratipay-username` - the user's username
- `gratipay-giving` - dollar-sign prefixed value of `giving`
- Links
- `gratipay-profile-link` - sets the `href` attribute to the user's profile
link
Expand All @@ -80,7 +65,7 @@ widget's HTML, and the following classes:
</a>
on <a class="gratipay-link">Gratipay</a>.
</div>
<script src="//grtp.co/v1.js"></script>
<script src="//grtp.co/v2.js"></script>
```


Expand All @@ -91,7 +76,7 @@ widget's HTML, and the following classes:
<img src="http://img.shields.io/gratipay/Gratipay.svg">
```

[Google Gadget](lib/v1/blogger) for Blogger.
[Google Gadget](lib/v2/blogger) for Blogger.


## Development
Expand Down

0 comments on commit 608b1f0

Please sign in to comment.