Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 3.0.0 #15

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ intended for use in the browser. `npm` installations are supported for the many

If you want to simply download the file to be used in the browser you can find them below:

* [Development Version](https://cdn.rawgit.com/neocotic/yourls-api/master/dist/yourls.js) (TODO - [Source Map](https://cdn.rawgit.com/neocotic/yourls-api/master/dist/yourls.js.map))
* [Production Version](https://cdn.rawgit.com/neocotic/yourls-api/master/dist/yourls.min.js) (TODO - [Source Map](https://cdn.rawgit.com/neocotic/yourls-api/master/dist/yourls.min.js.map))
* [Development Version](https://cdn.rawgit.com/neocotic/yourls-api/master/dist/yourls.js) (47kb - [Source Map](https://cdn.rawgit.com/neocotic/yourls-api/master/dist/yourls.js.map))
* [Production Version](https://cdn.rawgit.com/neocotic/yourls-api/master/dist/yourls.min.js) (5.6kb - [Source Map](https://cdn.rawgit.com/neocotic/yourls-api/master/dist/yourls.min.js.map))

## API

Expand Down Expand Up @@ -127,23 +127,23 @@ yourls.connect('https://example.com/yourls-api.php', {
As you may have noticed; this method also accepts the following entirely optional `options`:

Option | Description | Default
------ | ----------------------------------- | ---------
format | Format in which requests are sent | `"jsonp"`
method | HTTP method to be used for requests | `"GET"`
------ | ----------------------------------- | -----------------------------------------------
format | Format in which requests are sent | `"json"`
method | HTTP method to be used for requests | `"POST"` for `"json"` and `"GET"` for `"jsonp"`

``` javascript
// Does the same as specifying no options (i.e. using defaults)
// This is the best practice if you want to secure the data you're transmitting and you've setup CORS, if needed
yourls.connect('https://example.com/yourls-api.php', null, {
format: 'jsonp',
method: 'GET'
format: 'json',
method: 'POST'
})

// Best practice if you want to secure the data you're transmitting and you've setup CORS, if needed
// However, if you don't want to setup CORS (or can't), you can try using JSONP
yourls.connect('https://example.com/yourls-api.php', {
signature: '3002a61584'
}, {
format: 'json',
method: 'POST'
format: 'jsonp'
})
```

Expand Down Expand Up @@ -369,7 +369,7 @@ yourls.version(true, function(result, response) {
``` javascript
// Get version of this library
console.log(yourls.VERSION)
//=> "2.1.0"
//=> "3.0.0"
```

The current version of this library.
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yourls-api",
"version": "2.1.0",
"version": "3.0.0",
"description": "Bindings for the YOURLS API",
"homepage": "https://github.com/neocotic/yourls-api",
"authors": [
Expand Down
128 changes: 60 additions & 68 deletions dist/yourls.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/yourls.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/yourls.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/yourls.min.js.map

Large diffs are not rendered by default.

Loading