My Project
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Properties | List of all members
GiphyManager Class Reference
Inheritance diagram for GiphyManager:

Public Types

enum  Rating {
  None = 0 , Y , G , PG ,
  PG_13 , R
}
 
enum  Language {
  None = 0 , en , es , pt ,
  id , fr , ar , tr ,
  th , vi , de , it ,
  ja , ru , ko , pl ,
  nl , ro , hu , sv ,
  cs , hi , bn , da ,
  fa , tl , fi , iw ,
  ms , no , uk , CN ,
  TW
}
 

Public Member Functions

void SetChannelAuthentication (string userName, string apiKey="", string uploadApiKey="")
 
void Upload (string filePath, Action< GiphyUpload.Response > onComplete, Action< float > onProgress=null, Action onFail=null)
 Upload a specified GIF with its filePath to Giphy.
 
void Upload (string filePath, List< string > tags, Action< GiphyUpload.Response > onComplete, Action< float > onProgress=null, Action onFail=null)
 Upload a specified GIF with its filePath to Giphy. And add tag(s) to the GIF that allows it to be searched by browsing/searching.
 
void GetById (string giphyGifId, Action< GiphyGetById.Response > onComplete, Action onFail=null)
 Returns a GIF given that GIF's unique ID.
 
void GetByIds (List< string > giphyGifIds, Action< GiphyGetByIds.Response > onComplete, Action onFail=null)
 Returns an array of GIFs given that GIFs' unique IDs.
 
void Search (List< string > keyWords, Action< GiphySearch.Response > onComplete, Action onFail=null)
 Search all GIPHY GIFs for a word or phrase. Punctuation will be stripped and ignored.
 
void Random (Action< GiphyRandom.Response > onComplete, Action onFail=null)
 Get a random GIF from Giphy.
 
void Random (string hTag, Action< GiphyRandom.Response > onComplete, Action onFail=null)
 Get a random GIF by tag.
 
void Translate (string term, Action< GiphyTranslate.Response > onComplete, Action onFail=null)
 The translate API draws on search, but uses the GIPHY special sauce to handle translating from one vocabulary to another. In this case, words and phrases to GIFs. The result is Random even for the same term.
 
void Trending (Action< GiphyTrending.Response > onComplete, Action onFail=null)
 Fetch GIFs currently trending online. Hand curated by the GIPHY editorial team. The data returned mirrors the GIFs showcased on the GIPHY homepage.
 
void Search_Sticker (List< string > keyWords, Action< GiphyStickerSearch.Response > onComplete, Action onFail=null)
 
void Random_Sticker (Action< GiphyStickerRandom.Response > onComplete, Action onFail=null)
 
void Random_Sticker (string hTag, Action< GiphyStickerRandom.Response > onComplete, Action onFail=null)
 
void Translate_Sticker (string term, Action< GiphyStickerTranslate.Response > onComplete, Action onFail=null)
 
void Trending_Sticker (Action< GiphyStickerTrending.Response > onComplete, Action onFail=null)
 

Public Attributes

string m_GiphyUserName = ""
 Your user name on Giphy.
 
string m_GiphyApiKey = ""
 Your API key associated with your app on Giphy (for normal Gif API and Sticker API)
 
string m_GiphyUploadApiKey = ""
 Your upload API key associated with your app on Giphy (for Upload API, you can request a production key from Giphy if need)
 
string m_NormalGifApi = "https://api.giphy.com/v1/gifs"
 
string m_StickerApi = "https://api.giphy.com/v1/stickers"
 
string m_UploadApi = "https://upload.giphy.com/v1/gifs"
 
int m_ResultLimit = 10
 Number of results to return, maximum 100. Default: 25.
 
int m_ResultOffset = 0
 Results offset, default: 0.
 
Rating m_Rating = Rating.None
 Limit results to those rated GIFs (y,g, pg, pg-13 or r)
 
Language m_Language = Language.None
 Language use with GIFs Search API and Stickers Search API, specify default country for regional content. Default: en.
 
string m_Source_Post_Url = ""
 An url attach to the GIF Info>SOURCE field, for the uploaded GIF (e.g. Your website/The page on which this GIF was found)
 

Properties

string FullJsonResponseText [get, set]
 
static GiphyManager Instance [get]
 

Member Function Documentation

◆ GetById()

void GiphyManager.GetById ( string  giphyGifId,
Action< GiphyGetById::Response onComplete,
Action  onFail = null 
)
inline

Returns a GIF given that GIF's unique ID.

Parameters
giphyGifIdGiphy GIF identifier.
onCompleteOn complete.

◆ GetByIds()

void GiphyManager.GetByIds ( List< string >  giphyGifIds,
Action< GiphyGetByIds::Response onComplete,
Action  onFail = null 
)
inline

Returns an array of GIFs given that GIFs' unique IDs.

Parameters
giphyGifIdsGiphy GIF identifiers.
onCompleteOn complete.

◆ Random() [1/2]

void GiphyManager.Random ( Action< GiphyRandom::Response onComplete,
Action  onFail = null 
)
inline

Get a random GIF from Giphy.

Parameters
onCompleteOn complete.

◆ Random() [2/2]

void GiphyManager.Random ( string  hTag,
Action< GiphyRandom::Response onComplete,
Action  onFail = null 
)
inline

Get a random GIF by tag.

Parameters
hTagTag: the GIF tag to limit randomness by
onCompleteOn complete.

◆ Search()

void GiphyManager.Search ( List< string >  keyWords,
Action< GiphySearch::Response onComplete,
Action  onFail = null 
)
inline

Search all GIPHY GIFs for a word or phrase. Punctuation will be stripped and ignored.

Parameters
keyWordsKey words.
onCompleteOn complete.

◆ Translate()

void GiphyManager.Translate ( string  term,
Action< GiphyTranslate::Response onComplete,
Action  onFail = null 
)
inline

The translate API draws on search, but uses the GIPHY special sauce to handle translating from one vocabulary to another. In this case, words and phrases to GIFs. The result is Random even for the same term.

Parameters
termThe term to be translated.
onCompleteOn complete callback.

◆ Trending()

void GiphyManager.Trending ( Action< GiphyTrending::Response onComplete,
Action  onFail = null 
)
inline

Fetch GIFs currently trending online. Hand curated by the GIPHY editorial team. The data returned mirrors the GIFs showcased on the GIPHY homepage.

Parameters
onCompleteOn complete.

◆ Upload() [1/2]

void GiphyManager.Upload ( string  filePath,
Action< GiphyUpload::Response onComplete,
Action< float >  onProgress = null,
Action  onFail = null 
)
inline

Upload a specified GIF with its filePath to Giphy.

Parameters
filePathFile path.
onCompleteOn complete.
onProgressOn progress.

◆ Upload() [2/2]

void GiphyManager.Upload ( string  filePath,
List< string >  tags,
Action< GiphyUpload::Response onComplete,
Action< float >  onProgress = null,
Action  onFail = null 
)
inline

Upload a specified GIF with its filePath to Giphy. And add tag(s) to the GIF that allows it to be searched by browsing/searching.

Parameters
filePathFile path.
tagsTags.
onCompleteOn complete.
onProgressOn progress.

The documentation for this class was generated from the following file: