{"id":13509485,"url":"https://github.com/zabirauf/elixir-ipfs-api","last_synced_at":"2025-04-11T12:30:46.764Z","repository":{"id":141985847,"uuid":"46242212","full_name":"zabirauf/elixir-ipfs-api","owner":"zabirauf","description":"The Elixir library that is used to communicate with the IPFS REST endpoint.","archived":false,"fork":false,"pushed_at":"2020-03-03T15:02:00.000Z","size":14,"stargazers_count":47,"open_issues_count":4,"forks_count":12,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-22T13:34:01.830Z","etag":null,"topics":[],"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/zabirauf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-11-16T00:16:35.000Z","updated_at":"2023-10-29T15:28:48.000Z","dependencies_parsed_at":"2023-04-26T01:17:24.075Z","dependency_job_id":null,"html_url":"https://github.com/zabirauf/elixir-ipfs-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zabirauf%2Felixir-ipfs-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zabirauf%2Felixir-ipfs-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zabirauf%2Felixir-ipfs-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zabirauf%2Felixir-ipfs-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zabirauf","download_url":"https://codeload.github.com/zabirauf/elixir-ipfs-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248401927,"owners_count":21097328,"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":[],"created_at":"2024-08-01T02:01:08.466Z","updated_at":"2025-04-11T12:30:46.531Z","avatar_url":"https://github.com/zabirauf.png","language":"Elixir","funding_links":[],"categories":["Third Party APIs"],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/zabirauf/elixir-ipfs-api.svg)](https://travis-ci.org/zabirauf/elixir-ipfs-api) [![Inline docs](http://inch-ci.org/github/zabirauf/elixir-ipfs-api.svg)](http://inch-ci.org/github/zabirauf/elixir-ipfs-api)\n\nCurrent Version: [v0.1.0](https://hex.pm/packages/elixir_ipfs_api)\n\n# Elixir-Ipfs-Api\n\nThe Elixir library that is used to communicate with the IPFS REST endpoint.\n\n![elixir_ipfs_api](https://cloud.githubusercontent.com/assets/1104560/11236786/a332e2ba-8d90-11e5-9b21-e37a0931130c.png)\n\n# [Documentation](http://hexdocs.pm/elixir_ipfs_api/)\n\nThe documentation is posted at [hexdocs](http://hexdocs.pm/elixir_ipfs_api/)\n\n# How to use it\n\n## 1. Add the library to mix.exs\n\nThe package is published on [Hex](https://hex.pm). Add the elixir\\_ipfs\\_api as follow\n\n```\ndefp deps do\n    [\n        ...\n        {:elixir_ipfs_api, \"~\u003e 0.1.0\"}\n        ...\n    ]\nend\n```\n\n## 2. Start the IPFS Daemon\n\nStart the IPFS daemon by running the following in terminal\n\n```\n$ ipfs daemon\n```\n\nThis will start the ipfs daemon with the API endpoint at localhost:5001.\nIf you want to start the API endpoint at a different address then add to the config\n\n```\n$ ipfs config Addresses.API /ipfs/127.0.0.1/tcp/5007\n```\n\n## 3. Create the IpfsConnection in your code\n\nThe [IpfsConnection](http://hexdocs.pm/elixir_ipfs_api/IpfsConnection.html) entity contains the information of the IPFS API endpoint. By default it will try to connect to http://localhost:5001/api/v0\n\n```\nconn = %IpfsConnection{host: \"127.0.0.1\", base: \"api/v0\", port: 5007}\n```\n\n## Examples\n\n### Adding content to IPFS\n\n\n```\niex\u003e conn = %IpfsConnection{}\niex\u003e IpfsApi.add(conn, \"Hello world from Elixir-Ipfs-Api\")\n{:ok,\n %{\"Hash\" =\u003e \"QmTcCZJEW1kUcYU1bKQk9SMGRsTisMMWXuxJ1AQerHwyaA\",\n \"Name\" =\u003e \"QmTcCZJEW1kUcYU1bKQk9SMGRsTisMMWXuxJ1AQerHwyaA\"}}\n ```\n\n### Getting content from IPFS\n\n\n```\niex\u003e conn = %IpfsConnection{}\niex\u003e IpfsApi.get(conn, \"QmTcCZJEW1kUcYU1bKQk9SMGRsTisMMWXuxJ1AQerHwyaA\")\n\u003c\u003c81, 109, 84, 99, 67, 90, 74, 69, 87, 49, 107, 85, 99, 89, 85, 49, 98, 75, 81, 107, 57, 83, 77, 71, 82, 115, 84, 105, 115, 77, 77, 87, 88, 117, 120, 74, 49, 65, 81, 101, 114, 72, 119, 121, 97, 65, 0, 0, 0, 0, ...\u003e\u003e\n```\n\n# TODO\n- [] Add stream for adding \u0026 getting files to and from IPFS\n- [] Add a pool to request from multiple different IPFS nodes\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzabirauf%2Felixir-ipfs-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzabirauf%2Felixir-ipfs-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzabirauf%2Felixir-ipfs-api/lists"}