Skip to content

SunshineAPI/WebAPI

Repository files navigation

Notice: With the recent update to Bootstrap 3, it is highly possible that various parts of this API are no longer functional

Sunshine travis Coveralls Code Climate

Dependencies Dev Dependencies

Sunshine is a REST API for interaction with the Overcast Network and all related services including the forums, servers, maps, and authenticated endpoints.

Sunshine provides these services, both authenticated, and non-authenticated through a JSON Web API served by NodeJS, with data scraped from the Overcast Network with Cheerio.

View the documentation for Sunshine on the website

Sunshine is not affiliated with the Overcast Network, and will not be held liable for the actions performed through the API.

Installing

  1. Install redis and NodeJS
  2. Run npm install.
  3. If it was not done automatically, copy config.example.js to config.js. You can configure the app as you want.
  4. Start redis and run npm start

Redis Configuration

  • You have the option to configure the redis connection in the config.js file.
  • You can also set the environment variable REDIS_ENV that has the value of the environment variable that should be used with the redis connection.
    • Ex: If you wanted to use Sunshine on Heroku you could set REDIS_ENV=REDISCLOUD_URL and the Redis Cloud URL would be automatically set by the addon.

Testing

Due to Sunshine being based on a 3rd party website, testing Sunshine is a complicated process. In order to not repeatedly make requests to Overcast, we have created a tool called OvercastMock that scrapes and pushes web pages to sunshine-mock. We are able to request these pages, similarly to how we do with the base API. This however does mean, that as of right now, or until we implement a solution, we are not able to test authenticated modules, or POST requests.

Setup:

  1. Run npm test to run feature tests, and confirm that endpoints work. The test url is configurable in the config, but should not be changed to prevent rapid requests to Overcast.
  2. Run npm run-script test-all to run feature tests and generate code coverage information for Coveralls.

License

Sunshine is licensed to the Sunshine API Development team under the General Public License (GPL) v3 license, requiring that changes must be open sourced if the API is redistributed.

We suggest that you pull request any changes that you make in order to better the API for everyone, but this is not necessary in accordance to the license.

About

Unofficial REST API for the Overcast Network

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5