Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Commit

Permalink
updated README
Browse files Browse the repository at this point in the history
-- Bumped version to 0.1.7
-- Ignored useless files
  • Loading branch information
csotiriou committed May 17, 2015
1 parent a891ab5 commit 725ef74
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 91 deletions.
4 changes: 4 additions & 0 deletions .gitignore
@@ -1,2 +1,6 @@
Pods/Target Support Files/Pods
Pods
.idea
Podfile.lock
PromiseKit+AFNetworking.xcodeproj/project.xcworkspace/xcshareddata/PromiseKit+AFNetworking.xccheckout
PromiseKit+AFNetworking.xcworkspace/xcshareddata/PromiseKit+AFNetworking.xccheckout
2 changes: 1 addition & 1 deletion Podfile
@@ -1,5 +1,5 @@
platform :ios, '7.0'
pod 'AFNetworking', '~> 2.2'
pod 'AFNetworking', '~> 2.5'
pod 'PromiseKit/Promise'
pod 'PromiseKit/When'

Expand Down

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion PromiseKit-AFNetworking.podspec
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = 'PromiseKit-AFNetworking'
s.version = '0.1.6'
s.version = '0.1.7'
s.summary = 'PromiseKit extensions for AFNetworking'
s.license = 'MIT'
s.homepage = 'https://github.com/csotiriou/AFNetworking-PromiseKit/'
Expand Down
32 changes: 25 additions & 7 deletions README.md
Expand Up @@ -5,11 +5,12 @@ PromiseKit+AFNetworking is a small category addition to the delightful [PromiseK

For the time being, it's a small category addition to the core AFNetworking, facilitating development with the plain AFHTTPRequestOperation and with the AFHTTPRequestOperationManager.

#Requirements:
`PromiseKit+AFNetworking` uses `PromiseKit 1.5.x` and `AFNetworking 2.x.` Support for `PromiseKit 2.0` is currently underway.

#Installation
You have two options: Either use cocoapods (look into the appropriate section below), or
ust copy AFNetworking+Promises.h and AFNetworking+Promises.m in your project and use them.

I have just started using Cocoapods and making podfiles, so in case you encounter any issues with the podspec, please leave your comments in the issues section!!
ust copy `AFNetworking+PromiseKit.h` and `AFNetworking+PromiseKit.m` in your project and use them.

#Sample Uses:

Expand Down Expand Up @@ -76,6 +77,26 @@ Objects returned during these operations are optional here. Maximum arguments in

Of course, chaining and making concurrent operations work the same way as in AFHTTPRequestOperationManager.

###`when` and getting the NSURLDataTask that initiated the request.
Now you can get the `NSURLDataTask` that initiated the request when performing multiple concurrent requests with `when`

```objectivec
[self.sessionManager GETMultiple:@[@"/", @"/", @"/", @"/"] parameters:@[@{},@{},@{},@{}]].then(^(NSArray * responsesArray){
for (NSDictionary *responseDictionary in responsesArray){
NSLog(@"task description: %@", responseDictionary[kPMKAFResponseTaskKey]);
NSLog(@"response object description: %@", responseDictionary[kPMKAFResponseObjectKey]);
}
});
```
```objectivec
[self.operationManager GETMultiple:@[@"/", @"/", @"/", @"/"] parameters:@[@{},@{},@{},@{}]].then(^(NSArray * responsesArray){
for (NSDictionary *responseDictionary in responsesArray){
NSLog(@"operation description: %@", responseDictionary[kPMKAFResponseOperationKey]);
NSLog(@"response object description: %@", responseDictionary[kPMKAFResponseObjectKey]);
}
});
```

#Samples
Now unit tests are available, which demonstrate the basic functionality and give some basic examples on how to use this category. More unit tests are going to be added in the near future.

Expand All @@ -87,13 +108,10 @@ You can use the project with CocoaPods. Simply put this line into your podfile:
pod 'PromiseKit-AFNetworking'
```

Then do a ```pod update``` to get the latest version.


#To Do
- Update documentation
- Add unit tests (DONE!)
- Implement it for AFURLSessionManager (if it makes sense)
- Implement it for AFURLSessionManager (DONE!)
- Add some goodies, in cases where they make sense.

#Special Thanks
Expand Down

0 comments on commit 725ef74

Please sign in to comment.