Permalink
Browse files

Updated read me link

  • Loading branch information...
1 parent 45b0582 commit 72e75ad256f6c2cbf5f783a49c9f40d3b105f1d4 @keith committed Jan 2, 2013
Showing with 3,303 additions and 23 deletions.
  1. BIN Github Status.xcworkspace/xcuserdata/ksmiley.xcuserdatad/UserInterfaceState.xcuserstate
  2. +0 −1 Pods/BuildHeaders/AFNetworking/AFHTTPClient.h
  3. +574 −0 Pods/BuildHeaders/AFNetworking/AFHTTPClient.h
  4. +0 −1 Pods/BuildHeaders/AFNetworking/AFHTTPRequestOperation.h
  5. +133 −0 Pods/BuildHeaders/AFNetworking/AFHTTPRequestOperation.h
  6. +0 −1 Pods/BuildHeaders/AFNetworking/AFImageRequestOperation.h
  7. +108 −0 Pods/BuildHeaders/AFNetworking/AFImageRequestOperation.h
  8. +0 −1 Pods/BuildHeaders/AFNetworking/AFJSONRequestOperation.h
  9. +71 −0 Pods/BuildHeaders/AFNetworking/AFJSONRequestOperation.h
  10. +0 −1 Pods/BuildHeaders/AFNetworking/AFNetworkActivityIndicatorManager.h
  11. +75 −0 Pods/BuildHeaders/AFNetworking/AFNetworkActivityIndicatorManager.h
  12. +0 −1 Pods/BuildHeaders/AFNetworking/AFNetworking.h
  13. +44 −0 Pods/BuildHeaders/AFNetworking/AFNetworking.h
  14. +0 −1 Pods/BuildHeaders/AFNetworking/AFPropertyListRequestOperation.h
  15. +68 −0 Pods/BuildHeaders/AFNetworking/AFPropertyListRequestOperation.h
  16. +0 −1 Pods/BuildHeaders/AFNetworking/AFURLConnectionOperation.h
  17. +295 −0 Pods/BuildHeaders/AFNetworking/AFURLConnectionOperation.h
  18. +0 −1 Pods/BuildHeaders/AFNetworking/AFXMLRequestOperation.h
  19. +89 −0 Pods/BuildHeaders/AFNetworking/AFXMLRequestOperation.h
  20. +0 −1 Pods/BuildHeaders/AFNetworking/UIImageView+AFNetworking.h
  21. +78 −0 Pods/BuildHeaders/AFNetworking/UIImageView+AFNetworking.h
  22. +0 −1 Pods/BuildHeaders/Reachability/Reachability.h
  23. +116 −0 Pods/BuildHeaders/Reachability/Reachability.h
  24. +0 −1 Pods/Headers/AFNetworking/AFHTTPClient.h
  25. +574 −0 Pods/Headers/AFNetworking/AFHTTPClient.h
  26. +0 −1 Pods/Headers/AFNetworking/AFHTTPRequestOperation.h
  27. +133 −0 Pods/Headers/AFNetworking/AFHTTPRequestOperation.h
  28. +0 −1 Pods/Headers/AFNetworking/AFImageRequestOperation.h
  29. +108 −0 Pods/Headers/AFNetworking/AFImageRequestOperation.h
  30. +0 −1 Pods/Headers/AFNetworking/AFJSONRequestOperation.h
  31. +71 −0 Pods/Headers/AFNetworking/AFJSONRequestOperation.h
  32. +0 −1 Pods/Headers/AFNetworking/AFNetworkActivityIndicatorManager.h
  33. +75 −0 Pods/Headers/AFNetworking/AFNetworkActivityIndicatorManager.h
  34. +0 −1 Pods/Headers/AFNetworking/AFNetworking.h
  35. +44 −0 Pods/Headers/AFNetworking/AFNetworking.h
  36. +0 −1 Pods/Headers/AFNetworking/AFPropertyListRequestOperation.h
  37. +68 −0 Pods/Headers/AFNetworking/AFPropertyListRequestOperation.h
  38. +0 −1 Pods/Headers/AFNetworking/AFURLConnectionOperation.h
  39. +295 −0 Pods/Headers/AFNetworking/AFURLConnectionOperation.h
  40. +0 −1 Pods/Headers/AFNetworking/AFXMLRequestOperation.h
  41. +89 −0 Pods/Headers/AFNetworking/AFXMLRequestOperation.h
  42. +0 −1 Pods/Headers/AFNetworking/UIImageView+AFNetworking.h
  43. +78 −0 Pods/Headers/AFNetworking/UIImageView+AFNetworking.h
  44. +0 −1 Pods/Headers/Reachability/Reachability.h
  45. +116 −0 Pods/Headers/Reachability/Reachability.h
  46. +1 −1 README.md

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,133 @@
+// AFHTTPRequestOperation.h
+//
+// Copyright (c) 2011 Gowalla (http://gowalla.com/)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import <Foundation/Foundation.h>
+#import "AFURLConnectionOperation.h"
+
+/**
+ `AFHTTPRequestOperation` is a subclass of `AFURLConnectionOperation` for requests using the HTTP or HTTPS protocols. It encapsulates the concept of acceptable status codes and content types, which determine the success or failure of a request.
+ */
+@interface AFHTTPRequestOperation : AFURLConnectionOperation
+
+///----------------------------------------------
+/// @name Getting HTTP URL Connection Information
+///----------------------------------------------
+
+/**
+ The last HTTP response received by the operation's connection.
+ */
+@property (readonly, nonatomic, strong) NSHTTPURLResponse *response;
+
+///----------------------------------------------------------
+/// @name Managing And Checking For Acceptable HTTP Responses
+///----------------------------------------------------------
+
+/**
+ A Boolean value that corresponds to whether the status code of the response is within the specified set of acceptable status codes. Returns `YES` if `acceptableStatusCodes` is `nil`.
+ */
+@property (readonly) BOOL hasAcceptableStatusCode;
+
+/**
+ A Boolean value that corresponds to whether the MIME type of the response is among the specified set of acceptable content types. Returns `YES` if `acceptableContentTypes` is `nil`.
+ */
+@property (readonly) BOOL hasAcceptableContentType;
+
+/**
+ The callback dispatch queue on success. If `NULL` (default), the main queue is used.
+ */
+@property (nonatomic, assign) dispatch_queue_t successCallbackQueue;
+
+/**
+ The callback dispatch queue on failure. If `NULL` (default), the main queue is used.
+ */
+@property (nonatomic, assign) dispatch_queue_t failureCallbackQueue;
+
+///------------------------------------------------------------
+/// @name Managing Acceptable HTTP Status Codes & Content Types
+///------------------------------------------------------------
+
+/**
+ Returns an `NSIndexSet` object containing the ranges of acceptable HTTP status codes. When non-`nil`, the operation will set the `error` property to an error in `AFErrorDomain`. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
+
+ By default, this is the range 200 to 299, inclusive.
+ */
++ (NSIndexSet *)acceptableStatusCodes;
+
+/**
+ Adds status codes to the set of acceptable HTTP status codes returned by `+acceptableStatusCodes` in subsequent calls by this class and its descendants.
+
+ @param statusCodes The status codes to be added to the set of acceptable HTTP status codes
+ */
++ (void)addAcceptableStatusCodes:(NSIndexSet *)statusCodes;
+
+/**
+ Returns an `NSSet` object containing the acceptable MIME types. When non-`nil`, the operation will set the `error` property to an error in `AFErrorDomain`. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
+
+ By default, this is `nil`.
+ */
++ (NSSet *)acceptableContentTypes;
+
+/**
+ Adds content types to the set of acceptable MIME types returned by `+acceptableContentTypes` in subsequent calls by this class and its descendants.
+
+ @param contentTypes The content types to be added to the set of acceptable MIME types
+ */
++ (void)addAcceptableContentTypes:(NSSet *)contentTypes;
+
+
+///-----------------------------------------------------
+/// @name Determining Whether A Request Can Be Processed
+///-----------------------------------------------------
+
+/**
+ A Boolean value determining whether or not the class can process the specified request. For example, `AFJSONRequestOperation` may check to make sure the content type was `application/json` or the URL path extension was `.json`.
+
+ @param urlRequest The request that is determined to be supported or not supported for this class.
+ */
++ (BOOL)canProcessRequest:(NSURLRequest *)urlRequest;
+
+///-----------------------------------------------------------
+/// @name Setting Completion Block Success / Failure Callbacks
+///-----------------------------------------------------------
+
+/**
+ Sets the `completionBlock` property with a block that executes either the specified success or failure block, depending on the state of the request on completion. If `error` returns a value, which can be caused by an unacceptable status code or content type, then `failure` is executed. Otherwise, `success` is executed.
+
+ @param success The block to be executed on the completion of a successful request. This block has no return value and takes two arguments: the receiver operation and the object constructed from the response data of the request.
+ @param failure The block to be executed on the completion of an unsuccessful request. This block has no return value and takes two arguments: the receiver operation and the error that occurred during the request.
+
+ @discussion This method should be overridden in subclasses in order to specify the response object passed into the success block.
+ */
+- (void)setCompletionBlockWithSuccess:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
+ failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;
+
+@end
+
+///----------------
+/// @name Functions
+///----------------
+
+/**
+ Returns a set of MIME types detected in an HTTP `Accept` or `Content-Type` header.
+ */
+extern NSSet * AFContentTypesFromHTTPHeader(NSString *string);
+
@@ -0,0 +1,108 @@
+// AFImageRequestOperation.h
+//
+// Copyright (c) 2011 Gowalla (http://gowalla.com/)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import <Foundation/Foundation.h>
+#import "AFHTTPRequestOperation.h"
+
+#import <Availability.h>
+
+#if __IPHONE_OS_VERSION_MIN_REQUIRED
+#import <UIKit/UIKit.h>
+#elif __MAC_OS_X_VERSION_MIN_REQUIRED
+#import <Cocoa/Cocoa.h>
+#endif
+
+/**
+ `AFImageRequestOperation` is a subclass of `AFHTTPRequestOperation` for downloading an processing images.
+
+ ## Acceptable Content Types
+
+ By default, `AFImageRequestOperation` accepts the following MIME types, which correspond to the image formats supported by UIImage or NSImage:
+
+ - `image/tiff`
+ - `image/jpeg`
+ - `image/gif`
+ - `image/png`
+ - `image/ico`
+ - `image/x-icon`
+ - `image/bmp`
+ - `image/x-bmp`
+ - `image/x-xbitmap`
+ - `image/x-win-bitmap`
+ */
+@interface AFImageRequestOperation : AFHTTPRequestOperation
+
+/**
+ An image constructed from the response data. If an error occurs during the request, `nil` will be returned, and the `error` property will be set to the error.
+ */
+#if __IPHONE_OS_VERSION_MIN_REQUIRED
+@property (readonly, nonatomic, strong) UIImage *responseImage;
+#elif __MAC_OS_X_VERSION_MIN_REQUIRED
+@property (readonly, nonatomic, strong) NSImage *responseImage;
+#endif
+
+#if __IPHONE_OS_VERSION_MIN_REQUIRED
+/**
+ The scale factor used when interpreting the image data to construct `responseImage`. Specifying a scale factor of 1.0 results in an image whose size matches the pixel-based dimensions of the image. Applying a different scale factor changes the size of the image as reported by the size property. This is set to the value of scale of the main screen by default, which automatically scales images for retina displays, for instance.
+ */
+@property (nonatomic, assign) CGFloat imageScale;
+#endif
+
+/**
+ Creates and returns an `AFImageRequestOperation` object and sets the specified success callback.
+
+ @param urlRequest The request object to be loaded asynchronously during execution of the operation.
+ @param success A block object to be executed when the request finishes successfully. This block has no return value and takes a single arguments, the image created from the response data of the request.
+
+ @return A new image request operation
+ */
+#if __IPHONE_OS_VERSION_MIN_REQUIRED
++ (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest
+ success:(void (^)(UIImage *image))success;
+#elif __MAC_OS_X_VERSION_MIN_REQUIRED
++ (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest
+ success:(void (^)(NSImage *image))success;
+#endif
+
+/**
+ Creates and returns an `AFImageRequestOperation` object and sets the specified success callback.
+
+ @param urlRequest The request object to be loaded asynchronously during execution of the operation.
+ @param imageProcessingBlock A block object to be executed after the image request finishes successfully, but before the image is returned in the `success` block. This block takes a single argument, the image loaded from the response body, and returns the processed image.
+ @param success A block object to be executed when the request finishes successfully, with a status code in the 2xx range, and with an acceptable content type (e.g. `image/png`). This block has no return value and takes three arguments: the request object of the operation, the response for the request, and the image created from the response data.
+ @param failure A block object to be executed when the request finishes unsuccessfully. This block has no return value and takes three arguments: the request object of the operation, the response for the request, and the error associated with the cause for the unsuccessful operation.
+
+ @return A new image request operation
+ */
+#if __IPHONE_OS_VERSION_MIN_REQUIRED
++ (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest
+ imageProcessingBlock:(UIImage *(^)(UIImage *image))imageProcessingBlock
+ success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success
+ failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure;
+#elif __MAC_OS_X_VERSION_MIN_REQUIRED
++ (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest
+ imageProcessingBlock:(NSImage *(^)(NSImage *image))imageProcessingBlock
+ success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSImage *image))success
+ failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure;
+#endif
+
+@end
@@ -0,0 +1,71 @@
+// AFJSONRequestOperation.h
+//
+// Copyright (c) 2011 Gowalla (http://gowalla.com/)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import <Foundation/Foundation.h>
+#import "AFHTTPRequestOperation.h"
+
+/**
+ `AFJSONRequestOperation` is a subclass of `AFHTTPRequestOperation` for downloading and working with JSON response data.
+
+ ## Acceptable Content Types
+
+ By default, `AFJSONRequestOperation` accepts the following MIME types, which includes the official standard, `application/json`, as well as other commonly-used types:
+
+ - `application/json`
+ - `text/json`
+
+ @warning JSON parsing will use the built-in `NSJSONSerialization` class.
+ */
+@interface AFJSONRequestOperation : AFHTTPRequestOperation
+
+///----------------------------
+/// @name Getting Response Data
+///----------------------------
+
+/**
+ A JSON object constructed from the response data. If an error occurs while parsing, `nil` will be returned, and the `error` property will be set to the error.
+ */
+@property (readonly, nonatomic, strong) id responseJSON;
+
+/**
+ Options for reading the response JSON data and creating the Foundation objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONReadingOptions".
+ */
+@property (nonatomic, assign) NSJSONReadingOptions JSONReadingOptions;
+
+///----------------------------------
+/// @name Creating Request Operations
+///----------------------------------
+
+/**
+ Creates and returns an `AFJSONRequestOperation` object and sets the specified success and failure callbacks.
+
+ @param urlRequest The request object to be loaded asynchronously during execution of the operation
+ @param success A block object to be executed when the operation finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the JSON object created from the response data of request.
+ @param failure A block object to be executed when the operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data as JSON. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the error describing the network or parsing error that occurred.
+
+ @return A new JSON request operation
+ */
++ (AFJSONRequestOperation *)JSONRequestOperationWithRequest:(NSURLRequest *)urlRequest
+ success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, id JSON))success
+ failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON))failure;
+
+@end
Oops, something went wrong.

0 comments on commit 72e75ad

Please sign in to comment.