Skip to content

Commit

Permalink
README formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdonnelly committed Jun 25, 2014
1 parent 02205d8 commit 656e8bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Instantiation with App Only Auth:
let swifter = Swifter(consumerKey: "", consumerSecret: "", appOnly: true)
```

###Example Requests
##Example Requests

####OAuth Authorization:

Expand Down Expand Up @@ -104,7 +104,7 @@ swifter.postStatusUpdate("Hello, world", inReplyToStatusID: nil, lat: nil, long:

##JSON Handling

To make accessing data returned by twitter requests, Swifter provides a class for representing JSON which you interact with similarly to a dictionary. The main advantage of this over using a Dictionary<String, AnyObject> is that it's much easier to work with Swift's strict typing system and doesnt require you to constantly downcast objects. It also removes the need for lots optional chaining.
To make accessing data returned by twitter requests, Swifter provides a class for representing JSON which you interact with similarly to a dictionary. The main advantage of using this instead of a Dictionary<String, AnyObject> is that it works better with Swift's strict typing system and doesnt require you to constantly downcast accessed objects. It also removes the need for lots optional chaining, making your code much cleaner and easier to read.

Here's an example of how you would access the text of the first element in list of statuses:

Expand Down

0 comments on commit 656e8bc

Please sign in to comment.