banner



How To Upload A Shot On Dribbble

DribbbleSDK

DribbbleSDK is like shooting fish in a barrel-to-use iOS wrapper for Dribbble SDK. We're working hard to consummate the full coverage of bachelor methods and make this SDK the best Dribbble SDK for iOS. Take fun and stay tuned.

CI Status Version License Platform

Link to Android repo

Check out our Dribbble-SDK Android

Installation

Dribbble iOS SDK is bachelor through CocoaPods. To install it, just add the following line to your Podfile:

To run the example project, clone the repo, and run pod install from the Demo directory starting time.

Quick start

  • All you need - setup your DRApiClient case with your app Dribbble credentials
DRApiClientSettings *settings = [[DRApiClientSettings              alloc]              initWithBaseUrl:                              @"https://api.dribbble.com/v1/"                            oAuth2RedirectUrl:                              @"YOUR_REDIRECT_URL"                            oAuth2AuthorizationUrl:                              @"https://dribbble.com/oauth/qualify"                            oAuth2TokenUrl:                              @"https://dribbble.com/oauth/token"                            clientId:                              @"YOUR_OAuth2_CLIENT_ID"                            clientSecret:                              @"YOUR_OAuth2_CLIENT_SECRET"                            clientAccessToken:                              @"YOUR_OAuth2_CLIENT_ACCESS_TOKEN"                            scopes:[NSSet              setWithObjects:                              @"public"              ,                              @"write"              ,                              @"upload"              ,              nil]]; cocky.apiClient = [[DRApiClient              alloc]              initWithSettings:settings];

Phone call the -authorizeWithWebView method to perform OAuth2 authorization. (You need UIWebView to display login web page)

[apiClient              authorizeWithWebView:              self.webView              authHandler:^(NXOAuth2Account *account,              NSError              *error) {                              //here y'all can handle authorization results              }];

Authorization isn't required, y'all can apply not-authorized access for some methods. In this instance, API client uses default access token provided by Dribbble. You can get the app admission token, customer id and secret keys on your Dribbble app page, bank check out the next links:

  • Register your app on https://dribbble.com/account/applications/new

  • Documentation: http://developer.dribbble.com/v1/

API usage

Utilise DRApiClient course for all Dribbble stuff

  • Native Dribbble dominance with authorizeWithWebView method
- (void)authorizeWithWebView:(UIWebView *)webView authHandler:(DROAuthHandler)authHandler;
  • Get user info with loadUserInfoWithResponseHandler method
- (void)loadUserInfoWithResponseHandler:(DRResponseHandler)responseHandler;
  • Go whatsoever user`s data with this methods using userID (business relationship, likes, projects, teams, shots, followees)
- (void)loadAccountWithUser:(NSNumber              *)userId responseHandler:(DRResponseHandler)responseHandler; - (void)loadLikesWithUser:(NSNumber              *)userId params:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler; - (void)loadMyLikesWithParams:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler; - (void)loadProjectsWithUser:(NSNumber              *)userId params:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler; - (void)loadMyProjectsWithParams:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler; - (void)loadTeamsWithUser:(NSNumber              *)userId params:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler; - (void)loadMyTeamsWithParams:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler; - (void)loadShotsWithUser:(NSNumber              *)userId params:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler; - (void)loadMyShotsWithParams:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler; - (void)loadFollowersWithUser:(NSNumber              *)userId params:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler; - (void)loadMyFollowersWithParams:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler; - (void)loadFolloweesWithUser:(NSNumber              *)userId params:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler; - (void)loadMyFolloweesWithParams:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler;
  • Get your followee`s shots with loadFolloweesShotsWithParams method
- (void)loadFolloweesShotsWithParams:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler;
  • You can upload, update or delete your shot with this methods
- (void)uploadShotWithParams:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler; - (void)updateShot:(NSNumber              *)shotId withParams:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler; - (void)deleteShot:(NSNumber              *)shotId responseHandler:(DRResponseHandler)responseHandler;
  • Load shot/shots with params, from some category or just user`south shots with this methods
- (void)loadShotWith:(NSNumber              *)shotId responseHandler:(DRResponseHandler)responseHandler; - (void)loadShotsWithParams:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler; - (void)loadShotsFromCategory:(DRShotCategory *)category atPage:(int)page responseHandler:(DRResponseHandler)responseHandler; - (void)loadUserShots:(NSString              *)url params:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler;
  • Get list rebounds for a shot with loadReboundsWithShot method
- (void)loadReboundsWithShot:(NSNumber              *)shotId params:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler;
  • You can like/dissimilar, chect is this shot liked, meet who likes shot with this methods
- (void)likeWithShot:(NSNumber              *)shotId responseHandler:(DRResponseHandler)responseHandler; - (void)unlikeWithShot:(NSNumber              *)shotId responseHandler:(DRResponseHandler)responseHandler; - (void)checkLikeWithShot:(NSNumber              *)shotId responseHandler:(DRResponseHandler)responseHandler; - (void)loadLikesWithShot:(NSNumber              *)shotId params:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler;
  • Upload/get/update/delete comment/comments for shot, get likes with comments and check like/unlike with comment with this methods
- (void)uploadCommentWithShot:(NSNumber              *)shotId withBody:(NSString              *)body responseHandler:(DRResponseHandler)responseHandler; - (void)updateCommentWith:(NSNumber              *)commentId forShot:(NSNumber              *)shotId withBody:(NSString              *)body responseHandler:(DRResponseHandler)responseHandler; - (void)deleteCommentWith:(NSNumber              *)commentId forShot:(NSNumber              *)shotId responseHandler:(DRResponseHandler)responseHandler; - (void)loadCommentsWithShot:(NSNumber              *)shotId params:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler; - (void)loadCommentWith:(NSNumber              *)commentId forShot:(NSString              *)shotId responseHandler:(DRResponseHandler)responseHandler; - (void)likeWithComment:(NSNumber              *)commentId forShot:(NSString              *)shotId responseHandler:(DRResponseHandler)responseHandler; - (void)unlikeWithComment:(NSNumber              *)commentId forShot:(NSString              *)shotId responseHandler:(DRResponseHandler)responseHandler; - (void)checkLikeWithComment:(NSNumber              *)commentId forShot:(NSString              *)shotId responseHandler:(DRResponseHandler)responseHandler; - (void)loadLikesWithComment:(NSNumber              *)commentId forShot:(NSString              *)shotId params:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler;
  • Go/upload/delete attachment/attachments for shot with this methods
- (void)uploadAttachmentWithShot:(NSNumber              *)shotId params:(NSDictionary              *)params file:(NSData              *)file mimeType:(NSString              *)mimeType responseHandler:(DRResponseHandler)responseHandler; - (void)deleteAttachmentWith:(NSNumber              *)attachmentId forShot:(NSNumber              *)shotId responseHandler:(DRResponseHandler)responseHandler; - (void)loadAttachmentsWithShot:(NSNumber              *)shotId params:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler; - (void)loadAttachmentWith:(NSNumber              *)attachmentId forShot:(NSString              *)shotId params:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler;
  • Go projects for shot, project shots or verbal project by projectID with this methods
- (void)loadProjectsWithShot:(NSNumber              *)shotId params:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler; - (void)loadProjectWith:(NSNumber              *)projectId responseHandler:(DRResponseHandler)responseHandler; - (void)loadProjectShotsWith:(NSNumber              *)projectId responseHandler:(DRResponseHandler)responseHandler;
  • You tin follow/unfollow user and check if y'all/some user following user with this methods
- (void)followUserWith:(NSNumber              *)userId responseHandler:(DRResponseHandler)responseHandler; - (void)unFollowUserWith:(NSNumber              *)userId responseHandler:(DRResponseHandler)responseHandler; - (void)checkFollowingWithUser:(NSNumber              *)userId responseHandler:(DRResponseHandler)responseHandler; - (void)checkIfUserWith:(NSNumber              *)userId followingAnotherUserWith:(NSNumber              *)anotherUserId responseHandler:(DRResponseHandler)responseHandler;            
  • Get team members and all team shots with loadMembersWithTeam and loadShotsWithTeam methods
- (void)loadMembersWithTeam:(NSNumber              *)teamId params:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler; - (void)loadShotsWithTeam:(NSNumber              *)teamId params:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler;
  • All nearly buckets with following methods
- (void)loadMyBucketsWithParams:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler; - (void)loadBucketsWithUser:(NSNumber              *)userId params:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler; - (void)loadBucketsForShot:(NSNumber              *)shotId params:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler; - (void)loadBucket:(NSNumber              *)bucketId params:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler; - (void)loadBucketShots:(NSNumber              *)bucketId params:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler; - (void)addShotToBucket:(NSNumber              *)bucketId params:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler; - (void)deleteShotFromBucket:(NSNumber              *)bucketId params:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler; - (void)addBucketWithParams:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler; - (void)updateBucket:(NSNumber              *)bucketId params:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler; - (void)deleteBucket:(NSNumber              *)bucketId params:(NSDictionary              *)params responseHandler:(DRResponseHandler)responseHandler;
  • Logout

Requirements

iOS 7.0+

Dependencies

API customer is dependent on the next pods:

              'AFNetworking' for networking 'JSONModel' for like shooting fish in a barrel response-to-model translation 'NXOAuth2Client' for OAuth2 authorisation 'BlocksKit' for general purposes                          

Roadmap

Hither is the features list we're planning to include in the hereafter releases:

  • Completed Dribbble API methods implementation.
  • Request limit treatment.
  • Conditional requests back up.

Author

Agilie info@agilie.com

License

DribbbleSDK is available under the MIT license. See the LICENSE file for more info.

Source: https://github.com/agilie/dribbble-ios-sdk

Posted by: boyddering74.blogspot.com

0 Response to "How To Upload A Shot On Dribbble"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel