Ah, right, so how about …
Examples
To try the examples in /examples you will need a Discourse instance up and running, installed either locally or in the cloud, then:
- Specify your environment by making a copy of config-example.yml to create a file called config.yml with your environment settings.
- In a given example file, comment out all but the examples you want to run.
- Edit the example file with any required parameters, e.g. a target
usernamepassed to the method. - Running the file will then pull from your config.yml to run a given client method (e.g.
client.badges) against your Discourse instance
Testing
To run the discourse_api tests in spec:
- Install bundler in the discourse_api directory, run
gem install bundler - Inside of your discourse_api directory, run:
bundle exec rspec spec/