{"id":15288084,"url":"https://github.com/passy/giphy-api","last_synced_at":"2025-04-13T06:32:02.413Z","repository":{"id":56844036,"uuid":"53226261","full_name":"passy/giphy-api","owner":"passy","description":"Giphy HTTP API Wrapper for Haskell","archived":false,"fork":false,"pushed_at":"2020-03-06T15:05:56.000Z","size":90,"stargazers_count":27,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-25T03:20:53.369Z","etag":null,"topics":["giphy","haskell","lenses"],"latest_commit_sha":null,"homepage":"https://hackage.haskell.org/package/giphy-api","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/passy.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","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":"2016-03-05T22:24:13.000Z","updated_at":"2020-07-17T16:16:35.000Z","dependencies_parsed_at":"2022-08-26T12:51:59.896Z","dependency_job_id":null,"html_url":"https://github.com/passy/giphy-api","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/passy%2Fgiphy-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/passy%2Fgiphy-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/passy%2Fgiphy-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/passy%2Fgiphy-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/passy","download_url":"https://codeload.github.com/passy/giphy-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248182019,"owners_count":21060891,"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":["giphy","haskell","lenses"],"created_at":"2024-09-30T15:44:05.318Z","updated_at":"2025-04-13T06:32:02.006Z","avatar_url":"https://github.com/passy.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# giphy-api\n[![Build Status](https://travis-ci.org/passy/giphy-api.svg?branch=master)](https://travis-ci.org/passy/giphy-api)\n[![Hackage](http://img.shields.io/hackage/v/giphy-api.svg)](https://hackage.haskell.org/package/giphy-api)\n[![Stackage 8](http://stackage.org/package/giphy-api/badge/lts-8)](http://stackage.org/lts-8/package/giphy-api)\n[![Stackage 9](http://stackage.org/package/giphy-api/badge/lts-9)](http://stackage.org/lts-9/package/giphy-api)\n[![Stackage Nightly](http://stackage.org/package/giphy-api/badge/nightly)](http://stackage.org/nightly/package/giphy-api)\n\n\nA Haskell wrapper for the [Giphy HTTP API](https://github.com/Giphy/GiphyAPI)\nusing [servant-client](https://hackage.haskell.org/package/servant-client).\n\n## Usage\n\nThe module provides a `Giphy` monad which can be run with `runGiphy` to lift it\ninto IO. Here's a simple usage example:\n\n```hs\n{-# LANGUAGE OverloadedStrings #-}\n\nimport qualified Data.Text as T\nimport qualified Web.Giphy as Giphy\n\napiKey :: Giphy.Key\napiKey = Giphy.Key \"dc6zaTOxFJmzC\"\n\nsample :: IO ()\nsample = do\n  let config = Giphy.GiphyConfig apiKey\n  resp \u003c- Giphy.runGiphy (app \"puppies\") config\n  print resp\n\n  where\n    app :: T.Text -\u003e Giphy.Giphy [Giphy.Gif]\n    app q = do\n      resp \u003c- Giphy.search $ Giphy.Query q\n      return $ Giphy._searchItems resp\n```\n\nFor a slightly more complex example, check out the [sample app](app/Main.hs),\nwhich also features the use of lenses.\n\n## Building\n\nUse [stack](http://haskellstack.org) to build this library.\n\n```bash\n$ stack setup\n$ stack test\n# Drop the flag if you don't want the sample app to be built.\n$ stack build --flag=giphy-api:buildSample\n# To install the sample tool\n$ stack install\n```\n\n## Sample CLI Tool Usage\n\n```bash\n$ giphy-search --help\ngiphy-search\n\nUsage: giphy-search ([-s|--search ARG] | [-t|--translate ARG] | [RANDOM_TAG])\n  Find GIFs on the command line.\n\nAvailable options:\n  -h,--help                Show this help text\n  -s,--search ARG          Use search to find a matching GIF.\n  -t,--translate ARG       Use translate to find a matching GIF.\n  -V,--version             Show version information\n$ giphy-search puppies\nJust https://media2.giphy.com/media/PjQFtJnmdOlwI/giphy.gif\n$ giphy-search --translate superman\nJust https://media3.giphy.com/media/eOewytQL4tOOA/giphy.gif\n$ giphy-search \"1C4D539A-B787-497F-B1DC-8FCF8D2C026D\"\nNothing\n```\n\n## Missing features\n\n- There is no compiler flag at the moment to disable lenses if those aren't\n  needed. The library, however, uses `microlens` so the overhead should be\n  minimal.\n\n- The \"Stickers\" API endpoints are currently not covered. If you need them, let\n  me know. PRs obviously very welcome.\n\n- Some fields are currently not exposed. Again, if you need them, open an issue.\n  For example, I have never seen a type value other than \"gif\" so I decided\n  to skip it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpassy%2Fgiphy-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpassy%2Fgiphy-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpassy%2Fgiphy-api/lists"}