Skip to content
This repository was archived by the owner on Dec 9, 2020. It is now read-only.

Commit 4e0cf66

Browse files
committed
Improving documentation
1 parent 4f2bbc2 commit 4e0cf66

File tree

4 files changed

+91
-116
lines changed

4 files changed

+91
-116
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
/test/tmp/
1010
/test/version_tmp/
1111
/tmp/
12+
Gemfile.lock
1213

1314
## Ignore RubyMine
1415
.idea/
@@ -32,7 +33,6 @@ build/
3233

3334
# for a library or gem, you might want to ignore these files since the code is
3435
# intended to run in multiple environments; otherwise, check them in:
35-
# Gemfile.lock
3636
# .ruby-version
3737
# .ruby-gemset
3838

Gemfile.lock

-106
This file was deleted.

README.md

+85-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,86 @@
1-
# Natero
1+
[api-docs]: https://apidocs.natero.com/
2+
[free-sw]: https://www.fsf.org/licensing/essays/free-sw.html
3+
[issues]: https://github.com/bonusly/natero/issues
4+
[fork]: http://help.github.com/fork-a-repo/
5+
[branch]: http://learn.github.com/p/branching.html
6+
[pr]: http://help.github.com/send-pull-requests/
27

3-
Wrapper for Natero API
8+
# Natero Gem
9+
A Ruby interface for the [Natero Public API][api-docs].
10+
11+
## Installation
12+
```Bash
13+
gem install natero
14+
```
15+
16+
## Examples
17+
Significant functionality is covered with this gem, but some basic functionality is covered below.
18+
If you're interested in learning more, it's probably easiest to explore the specs in `/spec/natero`.
19+
20+
Set up your keys:
21+
```Ruby
22+
Natero.configure do |c|
23+
c.account_api_key = 'ACCOUNT_API_KEY'
24+
c.event_api_key = 'EVENT_API_KEY'
25+
c.event_auth_key = 'EVENT_AUTH_KEY'
26+
end
27+
```
28+
29+
Retrieve all accounts:
30+
```Ruby
31+
Natero::Account.retrieve_all
32+
```
33+
34+
Retrieve a specific account:
35+
```Ruby
36+
Natero::Account.retrieve('ACCOUNT_ID')
37+
```
38+
39+
Modify an account:
40+
```Ruby
41+
account = Natero::Account.retrieve('ACCOUNT_ID')
42+
account.name = 'TEST'
43+
44+
Natero::Account.modify('ACCOUNT_ID', account)
45+
```
46+
47+
Create an event:
48+
```Ruby
49+
event = { id: 'test', name: 'Testing the API.'}
50+
details = 'These details should be associated with the event in Natero'
51+
52+
Natero::Event.create(event, details)
53+
```
54+
55+
## Contributing
56+
In the spirit of [free software][free-sw], **everyone** is encouraged to help
57+
improve this project. Here are some ways *you* can contribute:
58+
59+
* Report bugs.
60+
* Suggest new features.
61+
* Write or edit documentation.
62+
* Write specifications.
63+
* Write code (**no patch is too small**: fix typos, add comments, clean up inconsistent whitespace).
64+
* Refactor code.
65+
* Fix [issues][].
66+
67+
#### Submitting an issue:
68+
We use the [GitHub issue tracker][issues] to track bugs and features. Before
69+
submitting a bug report or feature request, check to make sure it hasn't
70+
already been submitted. When submitting a bug report, please include a stack
71+
trace and any details that may be necessary to reproduce
72+
the bug, including your gem version, Ruby version, and operating system.
73+
Ideally, a bug report should include a pull request with failing specs.
74+
75+
#### Submitting a Pull Request
76+
1. [Fork the repository.][fork]
77+
2. [Create a topic branch.][branch]
78+
3. Add specs for your unimplemented feature or bug fix.
79+
4. Run `bundle exec rake spec`. If your specs pass, return to step 3.
80+
5. Implement your feature or bug fix.
81+
6. Run `bundle exec rake spec`. If your specs fail, return to step 5.
82+
7. Add documentation for your feature or bug fix.
83+
8. Commit and push your changes.
84+
9. [Submit a pull request.][pr]
85+
86+
_(Shamelessly based on the [Twitter Gem](https://github.com/sferik/twitter))_

natero.gemspec

+5-7
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ Gem::Specification.new do |spec|
99
spec.authors = ['Andrew Brown', 'Robert Ingrum']
1010
spec.email = '[email protected]'
1111
spec.summary = 'Wrapper for Natero API'
12-
spec.description = %q{
13-
Natero is customer success software used to reduce churn and increase B2B SaaS adoption.
14-
}
12+
spec.description = 'Natero is customer success software used to reduce churn and increase B2B SaaS adoption.'
1513
spec.homepage = 'http://bonus.ly'
1614
spec.license = 'MIT'
1715

@@ -20,10 +18,10 @@ Gem::Specification.new do |spec|
2018
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
2119
spec.require_paths = ['lib']
2220

23-
spec.add_dependency 'httparty', '~> 0.13'
24-
spec.add_development_dependency 'bundler', '~> 1.11'
25-
spec.add_development_dependency 'rake', '~> 10.0'
26-
spec.add_development_dependency 'rspec', '~> 3.0'
21+
spec.add_dependency 'httparty', '~> 0.13'
22+
spec.add_development_dependency 'bundler', '~> 1.11'
23+
spec.add_development_dependency 'rake', '~> 10.0'
24+
spec.add_development_dependency 'rspec'
2725
spec.add_development_dependency 'rspec-rails'
2826
spec.add_development_dependency 'spring'
2927
spec.add_development_dependency 'spring-commands-rspec'

0 commit comments

Comments
 (0)