Giter Club home page Giter Club logo

gifpicker's Introduction

GifPicker

An easy Swift library for accessing and using GIFs from the web and the user's library

Quick Use

To access the Giphy API, you'll need to get a key from Giphy

Once you've gotten your key:

GifManager.shared.APIKey = "YOUR_API_KEY"

To get Trending Giphy GIFS:

GifManager.shared.fetchTrendingGifs { (gifs) in
        //Returns trending Gifs
        //Can also be accessed via GifManager.shared.trendingGifs
}

To perform a search for GIFS:

GifManager.shared.searchGifs(search: "yourSearchHere") { (gifs) in
        //Returns GIFs that match the search query from Giphy
        //Results also be accessed via GifManager.shared.searchGifs
}

Each search is limited to 50 results.

To get the next page of search results:

GifManager.shared.searchNextPage { (gifs, exhuasted) in
    //gifs = the next 50 gifs, appended to GifManager.shared.searchGifs            
    //exhausted is a Bool that returns true if there's no more GIFs to fetch for the searchQuery
}

A individual Gif is returned as a GifAsset which returns a URL for the original GIF using URL, and one to display as a thumbnail under thumbURL. Download the contents into a Data object then display them in a UIImage.

Coming Soon:

  • More flexibility in editing Search options
  • A better way to download the actual GIFs from GifAssets
  • Easy access to GIFs in the Users Camera Roll
  • A GifPickerViewController that quickly and simply interfaces the entire model

Contact Me

If you have a personal request for a change, contact me! [email protected]

gifpicker's People

Contributors

rcaraway avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.