{"id":1891,"url":"https://github.com/heyalexchoi/Giphy-iOS","last_synced_at":"2025-08-02T05:33:07.716Z","repository":{"id":19823585,"uuid":"23084514","full_name":"heyalexchoi/Giphy-iOS","owner":"heyalexchoi","description":"Giphy API client for iOS in Objective-C","archived":false,"fork":false,"pushed_at":"2017-02-07T22:24:27.000Z","size":2525,"stargazers_count":52,"open_issues_count":2,"forks_count":61,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-29T17:06:26.380Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heyalexchoi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-18T19:57:12.000Z","updated_at":"2023-11-30T03:26:45.000Z","dependencies_parsed_at":"2022-08-21T03:20:29.434Z","dependency_job_id":null,"html_url":"https://github.com/heyalexchoi/Giphy-iOS","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heyalexchoi%2FGiphy-iOS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heyalexchoi%2FGiphy-iOS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heyalexchoi%2FGiphy-iOS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heyalexchoi%2FGiphy-iOS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heyalexchoi","download_url":"https://codeload.github.com/heyalexchoi/Giphy-iOS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228443707,"owners_count":17920770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:15:58.303Z","updated_at":"2024-12-06T09:30:36.173Z","avatar_url":"https://github.com/heyalexchoi.png","language":"Objective-C","funding_links":[],"categories":["SDK","Unofficial","非官方"],"sub_categories":["Unofficial","Other free courses"],"readme":"# Giphy-iOS\n\u003c!--- [![CI Status](http://img.shields.io/travis/Alex Choi/AXCGiphy.svg?style=flat)](https://travis-ci.org/Alex Choi/AXCGiphy) --\u003e \n[![Version](https://img.shields.io/cocoapods/v/Giphy-iOS.svg?style=flat)](http://cocoadocs.org/docsets/Giphy-iOS)\n[![License](https://img.shields.io/cocoapods/l/Giphy-iOS.svg?style=flat)](http://cocoadocs.org/docsets/Giphy-iOS)\n[![Platform](https://img.shields.io/cocoapods/p/Giphy-iOS.svg?style=flat)](http://cocoadocs.org/docsets/Giphy-iOS)\n\nGiphy-iOS is a [Giphy API](https://github.com/Giphy/GiphyAPI) client for iOS in Objective-C.\n\n\n## Usage\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\nYou should read about [Giphy's Access and API keys here](https://github.com/Giphy/GiphyAPI#access-and-api-keys).\n\n### Giphy-iOS / AXCGiphy\n'AXCGiphy' provides convenient access to [Giphy's API](https://github.com/Giphy/GiphyAPI) endpoints:\n\n- search\n- trending\n- translate\n- GIF by ID\n- GIFs by IDs\n\nYou can query the endpoints through the blocks based interface:\n\n\n```objective-c\n\n- (void)viewDidLoad\n{\n    [super viewDidLoad];\n\t// set your API key before making any requests. You may use kGiphyPublicAPIKey for development.\n    [AXCGiphy setGiphyAPIKey:kGiphyPublicAPIKey];\n\n    [AXCGiphy searchGiphyWithTerm:@\"frogs\" limit:10 offset:0 completion:^(NSArray *results, NSError *error) {\n        self.giphyResults = results;\n        [[NSOperationQueue mainQueue] addOperationWithBlock:^{\n            [self.collectionView reloadData];\n        }];\n    }];\n}\n\n\n- (UICollectionViewCell *) collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath\n{\n    AXCCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:kCollectionViewCellIdentifier forIndexPath:indexPath];\n    AXCGiphy * gif = self.giphyResults[indexPath.item];\n    \n    NSURLRequest * request = [NSURLRequest requestWithURL:gif.originalImage.url];\n    [[[NSURLSession sharedSession] dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {\n        UIImage * image = [UIImage imageWithData:data];\n        [[NSOperationQueue mainQueue] addOperationWithBlock:^{\n            cell.imageView.image = image;\n        }];\n    }] resume];\n    \n    return cell;\n}\n\n```\n\nAXCGiphy blocks based class methods provide asynchronous access to either AXCGiphy instances or an NSArray of AXCGiphy instances. AXCGiphy instances represent Giphy's gifs and their metadata. However, AXCGiphy only provides URLs to gifs. How you use these URLs is up to you.\n\nMy example uses NSURLRequests with NSURLSession to fetch the image data at the URLs and [mattt's AnimatedGifSerialization](https://github.com/mattt/AnimatedGIFImageSerialization) to decode the animated GIFs into animated UIImages. If you are unsure of how to proceed, use my example app as a starting point.\n\nThe blocks based class methods return NSURLSessionDataTasks for additional control, should you need it.\n\nAXCGiphy also provides class methods to generate NSURLRequests for these endpoints.\n\n\n\n## Requirements\n\nAFNetworking/Serialization 2.3.1\n\n\n## Installation\n\nGiphy-iOS is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n    pod \"Giphy-iOS\"\n    pod 'AFNetworking/Serialization', '~\u003e 2.3.1'\n\n## Author\n\nAlex Choi, heyalexchoi@gmail.com\n\n## License\n\nGiphy-iOS is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheyalexchoi%2FGiphy-iOS","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheyalexchoi%2FGiphy-iOS","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheyalexchoi%2FGiphy-iOS/lists"}