Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update README.md

Adding objc coloring to code blocks.
  • Loading branch information...
commit 44a278e207e0626f0f43d9c383028f1697e16d0e 1 parent 357a7d3
Parker pwightman authored
Showing with 4 additions and 5 deletions.
  1. +4 −5 README.md
9 README.md
View
@@ -13,14 +13,14 @@ pod 'FatSecretKit'
Then `import` it as necessary
-```
+```objc
#import <FatSecretKit/FSClient.h>
```
## Usage
The toughest part of making your own client is the OAuth negotiation, so this should save you some precious hours. All you need is your OAuth consumer key and secret. Preferred usage is through the `sharedClient`:
-```
+```objc
[FSClient sharedClient].oauthConsumerKey = @"12345";
[FSClient sharedClient].oauthConsumerSecret = @"67890";
```
@@ -31,7 +31,7 @@ You're all set to use the APIs.
### Food Search
-```
+```objc
[[FSClient sharedClient] searchFoods:term
completion:^(NSArray *foods, NSInteger maxResults, NSInteger totalResults, NSInteger pageNumber) {
// Use data as you will.
@@ -48,12 +48,11 @@ You're all set to use the APIs.
self.foods = foods;
[self.tableView reloadData];
}];
-
```
### Get Food
-```
+```objc
[[FSClient sharedClient] getFood:item.identifier
completion:^(FSFood *food) {
NSLog(@"Name: %@", food.name)
Please sign in to comment.
Something went wrong with that request. Please try again.