TenorAPIKit provides trending GIFs, trending tags, trending categories, GIF search, autocomplete results, and search suggestions from the Tenor API.
- iOS 15.0 or later
- Open Your Project from Xcode
- then click (File > Add Packages).
- Now Enter https://github.com/sagarthecoder/TenorAPIKit in the search box.
- Click Add Package
import TenorAPIKit
let service = TenorService()
service.getCategories(key: key) { categoryList in
/// Trending Category List
}
service.getTrendingGifs(key: key, limit: 10, pos: nil) { tenorResults in
/// Trending Tenor Results
}
service.getTrendingTags(key: key, limit: 10) { terms in
/// Trending Terms
}
service.searchGifs(key: key, searchKey: "love", limit: 10, pos: nil) { results in
/// search results
}
service.getSearchSuggestions(key: key, searchKey: "smile", limit: 10, pos: nil) { suggestions in
/// search suggestions
}
service.getAutocompleteTags(key: key, query: "exc", limit: 5) { results in
/// autocomplete results
}
Note :
pos
means pagination key.pos = "0"
means no pagination exists. Ifpos
is set asnil
then pagination won't work.- Default API Key
LIVDSRZULELA