{"id":27166853,"url":"https://github.com/allyedge/exbitly","last_synced_at":"2025-04-09T04:40:19.369Z","repository":{"id":62430846,"uuid":"505181269","full_name":"Allyedge/exbitly","owner":"Allyedge","description":"An Elixir library to interact with the Bitly API.","archived":false,"fork":false,"pushed_at":"2022-06-19T21:36:02.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-12-08T16:15:44.891Z","etag":null,"topics":["bitly","bitly-api","elixir","elixir-library"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/Allyedge.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":"2022-06-19T17:52:20.000Z","updated_at":"2022-12-28T19:13:20.000Z","dependencies_parsed_at":"2022-11-01T20:30:53.891Z","dependency_job_id":null,"html_url":"https://github.com/Allyedge/exbitly","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Allyedge%2Fexbitly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Allyedge%2Fexbitly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Allyedge%2Fexbitly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Allyedge%2Fexbitly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Allyedge","download_url":"https://codeload.github.com/Allyedge/exbitly/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247980826,"owners_count":21027803,"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":["bitly","bitly-api","elixir","elixir-library"],"created_at":"2025-04-09T04:40:18.654Z","updated_at":"2025-04-09T04:40:19.299Z","avatar_url":"https://github.com/Allyedge.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Exbitly\n\n[![Hex.pm](https://img.shields.io/hexpm/v/exbitly.svg?style=flat)](https://hex.pm/packages/exbitly)\n[![Hex.pm Downloads](https://img.shields.io/hexpm/dt/exbitly.svg?style=flat)](https://hex.pm/packages/exbitly)\n\nAn Elixir library to interact with the Bitly API.\n\n## Installation\n\nTo use Exbitly, you first have to add it to your `mix.exs` dependencies.\n\n```elixir\ndefp deps do\n  [\n    {:exbitly, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\nAfter that, you have to create a `config` folder and a `config.exs` file inside that folder.\nThen, pass the code below inside the `config.exs` file and add your token in it.\n\n```elixir\nimport Config\n\nconfig :exbitly,\n  token: \"\"\n```\n\nWithout the `config.exs` file, you won't be able to shorten URLs.\n\n## Usage\n\nYou can use `shorten/2` to shorten a URL.\n\n```elixir\nExbitly.shorten(\"bit.ly\", \"https://www.example.com\")\n# {:ok, \"http://bit.ly/short_url\"}\n\nExbitly.shorten(\"random\", \"https://www.example.com\")\n# {:error, %{\n#   \"description\" =\u003e \"The value provided is invalid.\",\n#   \"errors\" =\u003e [%{\"error_code\" =\u003e \"invalid\", \"field\" =\u003e \"domain\"}],\n#   \"message\" =\u003e \"INVALID_ARG_DOMAIN\",\n#   \"resource\" =\u003e \"bitlinks\"\n# }}\n```\n\nIf you prefer exceptions, you can always use `shorten!/2` instead of `shorten/2`.\n\n```elixir\nExbitly.shorten!(\"bit.ly\", \"https://www.example.com\")\n# {:ok, \"http://bit.ly/short_url\"}\n\nExbitly.shorten!(\"random\", \"https://www.example.com\")\n# ** (Exbitly.Error) An error occured while shortening the URL. Message: INVALID_ARG_DOMAIN - Description: The value provided is invalid.\n```\n\n## License\n\nCopyright (c) 2022-present Alim Arslan Kaya.\n\nExbitly is licensed under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallyedge%2Fexbitly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fallyedge%2Fexbitly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallyedge%2Fexbitly/lists"}