zabirauf / elixir-ipfs-api Goto Github PK
View Code? Open in Web Editor NEWThe Elixir library that is used to communicate with the IPFS REST endpoint.
License: MIT License
The Elixir library that is used to communicate with the IPFS REST endpoint.
License: MIT License
Hello!
I've been working a lot with the IPFS API lately in some side projects and I've been using this library quite often.
As the title says, I want to know if you are thinking about keeping this project and/or if I can jump in to help keeping it updated.
I've some suggestions like "transactions" (I believe this is/was a planned feature) and also adding a function to the library (which I keep adding to the projects I'm using IPFS), to parse the binary data that often comes in commands such as /api/v0/object/get
.
Let me know your ideas!
When multiple endpoints are supported
Basic API, data structure APIs.
In some commands such as /api/v0/object/get
there is a field called Data
that contains the binary data of an object. I think it could be useful to add a function to parse it like:
def parse_body_data(data, fun \\ & &1) when is_binary(data) do
if String.printable?(data) do
data
else
data
|> String.split("")
|> Stream.filter(&filter_body_data(&1))
|> Stream.filter(&fun.(&1))
|> Enum.join()
end
defp filter_body_data(""), do: false
defp filter_body_data(s), do: String.printable?(s)
The fun
argument is to allow filtering specific characters, for example the \b
. This function will only return printable characters to allow printing the string, otherwise it would be returned in the <<>>
binary format anyway.
Hello! I wanted to build something with IPFS and your library, but it seems like there is something wrong with dependencies.
Added {:elixir_ipfs_api, "~> 0.1.0"}
to mix.exs file
Running command mix deps.get
fails with that output:
Resolving Hex dependencies...
Dependency resolution completed:
New:
certifi 1.0.0
elixir_ipfs_api 0.1.0
ex_doc 0.10.0
hackney 1.6.6 RETIRED!
(invalid)
httpoison 0.8.3
idna 4.0.0
metrics 1.0.1
mimerl 1.0.2
poison 1.5.2
ssl_verify_fun 1.1.1
* Getting elixir_ipfs_api (Hex package)
* Getting ex_doc (Hex package)
* Getting httpoison (Hex package)
* Getting poison (Hex package)
* Getting hackney (Hex package)
* Getting certifi (Hex package)
* Getting idna (Hex package)
* Getting metrics (Hex package)
* Getting mimerl (Hex package)
* Getting ssl_verify_fun (Hex package)
dependency :ssl_verify_fun is using Rebar 2, which is no longer maintained and no longer works in recent Erlang/OTP versions. Remove the :manager option or set it to :rebar3 instead
elixir version
iex --version
Erlang/OTP 23 [erts-11.1.8] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1]
IEx 1.13.4 (compiled with Erlang/OTP 22)
I'm new to elixir, so all of it doesn't make sense yet. What can be done to make it work?
This will make sure that one IPFS endpoint does not become the bottleneck.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.