Metagame-API is a Ruby on Rails API which adds gamification behavior to your project. The API implements different gamification concepts like Points, Badges and Ranks.
You will need the following to be installed:
- Ruby language (2.3)
- Ruby on Rails (4.2.5).
- Bundler (http://bundler.io/)
- Clone this repo.
- Move into the folder of this project and execute:
$ bundle install
-
Move to folder config/ and create a application.yml file following the example in application_example.yml. Inside the file application.yml you have to specify your database configuration.
-
Move to the main folder of Metagame-API, and run the migrations
$ rake db:create
$ rake db:migrate
$ rake db:seed
Inside the file application.yml you have to specify your database configuration.
- Finally, run the API executing:
$ rails server
The API will be running in port 3000. But you can change it, executing it with the -p (port param). E.g: "rails server -p 5000"
All the endpoints are specified in the Wiki of this project.
In order to use this API you will have to send the following token in your Authorization HTTP header:
Token token="tok3nexamplekjhuyq34jasn"
The value of the Token is inside your database, in your project table. Check your project token !
The API contains a folder inside spec/ which has unit tests. To run all tests, move to the main folder of the project and execute:
$ rspec
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Created by Pravisani Santiago (http://www.github.com/sanatem)
Cientopolis @ Lifia