Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanhimmelman committed May 10, 2015
2 parents 290e658 + 31771ea commit f583be1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions AlamofireObjectMapper.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Pod::Spec.new do |s|
s.name = "AlamofireObjectMapper"
s.version = "0.1"
s.license = { :type => "MIT", :file => "LICENSE" }
s.summary = "An extension to Alamofire which converts responses into objects using ObjectMapper"
s.summary = "An extension to Alamofire which automatically converts JSON response data into swift objects using ObjectMapper"
s.homepage = "https://github.com/tristanhimmelman/AlamofireObjectMapper"
s.author = { "Tristan Himmelman" => "[email protected]" }
s.source = { :git => 'https://github.com/tristanhimmelman/AlamofireObjectMapper.git', :tag => s.version.to_s }
Expand All @@ -15,4 +15,4 @@ Pod::Spec.new do |s|
s.dependency 'Alamofire', '~> 1.2'
s.dependency 'ObjectMapper', '~> 0.10'

end
end
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@ Given a URL which returns weather data in the following form:
You can use this extension as the follows:
```swift
let URL = "https://raw.githubusercontent.com/tristanhimmelman/AlamofireObjectMapper/d8bb95982be8a11a2308e779bb9a9707ebe42ede/sample_json"
Alamofire.request(.GET, URL, parameters: nil).responseObject { (response: WeatherResponse?, error: NSError?) in
println(response?.location)
if let threeDayForecast = response?.threeDayForecast {
for forecast in threeDayForecast {
println(forecast.day)
println(forecast.temperature)
}
}
Alamofire.request(.GET, URL, parameters: nil)
.responseObject { (response: WeatherResponse?, error: NSError?) in
println(response?.location)
if let threeDayForecast = response?.threeDayForecast {
for forecast in threeDayForecast {
println(forecast.day)
println(forecast.temperature)
}
}
}
```

Expand Down

0 comments on commit f583be1

Please sign in to comment.