Skip to content

Commit

Permalink
Change README to markdown format
Browse files Browse the repository at this point in the history
This commit changes the readme to markdown format. This allows for
better code syntax highlighting.
  • Loading branch information
endoze committed Jun 16, 2013
1 parent fa6c304 commit 0c4dcb9
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 61 deletions.
70 changes: 70 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# health_graph

[![Build
Status](https://travis-ci.org/endoze/health_graph.png?branch=master")](https://travis-ci.org/endoze/health_graph]
[![Dependency
Status](https://gemnasium.com/endoze/health_graph.png)](https://gemnasium.com/endoze/health_graph)
[![Coverage
Status](https://coveralls.io/repos/endoze/health_graph/badge.png?branch=master)](https://coveralls.io/r/endoze/health_graph?branch=master)
[![Code
Climate](https://codeclimate.com/github/endoze/health_graph.png)](https://codeclimate.com/github/endoze/health_graph)

Ruby gem to work with RunKeeper Health Graph API. More information about RunKeeper Health Graph API http://developer.runkeeper.com/healthgraph.

## Usage

### Authentication

```ruby
HealthGraph.configure do |config|
config.client_id = [YOUR HEALTH GRAPH CLIENT ID]
config.client_secret = [YOUR HEALTH GRAPH CLIENT SECRET]
config.authorization_redirect_url = [PAGE TO REDIRECT THE USER TO AFTER AUTH]
end

auth_url = HealthGraph.authorize_url

access_token = HealthGraph.access_token(auth_code)
```

For more information on authentication & authorization, see http://developer.runkeeper.com/healthgraph/registration-authorization

### Accessing Health Graph API

```ruby
user = HealthGraph::User.new(access_token)
profile = user.profile
fitness_activities = user.fitness_activities.items
sleep = user.sleep.items
weight = user.weight.items
```
### Other Configuration options

```ruby
HealthGraph.configure do |config|
config.client_id = [YOUR HEALTH GRAPH CLIENT ID. REQUIRED.]
config.client_secret = [YOUR HEALTH GRAPH CLIENT SECRET. REQUIRED.]
config.authorization_redirect_url = [PAGE TO REDIRECT THE USER TO AFTER AUTH. REQUIRED.]
config.authorization_url = [URL TO AUTHORIZE USER. DEFAULT IS http://runkeeper.com/apps/authorize]
config.access_token_url = [URL TO GET USER ACCESS TOKEN. DEFAULT IS http://runkeeper.com/apps/token]
config.endpoint = [API ENDPOINT. DEFAULT IS http://api.runkeeper.com]
config.adapter = [FARADAY ADAPTER. DEFAULT IS net_http]
config.faraday_options = [ADDITIONAL FARADAY OPTIONS. DEFAULT IS EMPTY.]
end
```

## Contributing to health_graph

* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
* Fork the project
* Start a feature/bugfix branch
* Commit and push until you are happy with your contribution
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

## Copyright

Copyright (c) 2011 Kenny Ma. See LICENSE.txt for
further details.

61 changes: 0 additions & 61 deletions README.rdoc

This file was deleted.

0 comments on commit 0c4dcb9

Please sign in to comment.