Skip to content

Commit

Permalink
Changes required to support API version 10
Browse files Browse the repository at this point in the history
  • Loading branch information
auralia committed Apr 12, 2020
1 parent af58edd commit 681420d
Show file tree
Hide file tree
Showing 24 changed files with 3,969 additions and 5,453 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.2.0 ##

* Support API version 10

## 0.1.15 ##

* Bug fixes
Expand Down
2 changes: 1 addition & 1 deletion NOTICE.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
node-nsapi
Copyright (C) 2016-2017 Auralia
Copyright (C) 2016-2020 Auralia
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,35 @@

[![npm version](https://badge.fury.io/js/nsapi.svg)](https://badge.fury.io/js/nsapi)

nsapi is a free and open source library that allows Node.js applications to
easily access the NationStates API without worrying about making HTTP requests,
nsapi is a free and open source library that allows Node.js applications to
easily access the NationStates API without worrying about making HTTP requests,
decoding XML, caching or rate limiting.

nsapi features the following:

* a complete interface to the NationStates API (supports the nation, region,
world, World Assembly, telegram, and authentication APIs)
* rate-limiting to prevent blocked access to the API, including for the
world, World Assembly, telegram, trading cards, and authentication APIs)
* rate-limiting to prevent blocked access to the API, including for the
telegram API (recruitment and non-recruitment)
* optional URI-based request caching
* XML decoding (all data is returned in simple JavaScript data structures)
* support for version 9 of the NationStates API
* support for version 10 of the NationStates API

## Usage ##

You can install nsapi using npm: `npm install nsapi`.

You can also build nsapi from source using Gulp. There are two main targets:
`prod` and `dev`. The only difference between them is that `dev` includes
source maps. There is also a `docs` target to generate documentation.
You can also build nsapi locally using npm: `npm run-script build`.

Consult [the documentation](https://auralia.github.io/node-nsapi/) for more
Consult [the documentation](https://auralia.github.io/node-nsapi/) for more
information on API structure and methods.

nsapi targets ES5 but requires support for ES6 promises, so if you're not
nsapi targets ES5 but requires support for ES6 promises, so if you're not
using a runtime that supports them natively, you'll have to use a polyfill.

## Examples ##

The following is a simple example that retrieves a nation's full name and prints
The following is a simple example that retrieves a nation's full name and prints
it to the console.

```js
Expand Down
Loading

0 comments on commit 681420d

Please sign in to comment.