GithubHelp home page GithubHelp logo

justhyx / cpp-ipfs-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vasild/cpp-ipfs-http-client

0.0 2.0 0.0 394 KB

IPFS C++ API client library

License: MIT License

Shell 0.41% CMake 2.50% C++ 97.09%

cpp-ipfs-api's Introduction

IPFS C++ API client library

Build Status Coverage Status Documentation GitHub Issues CII Best Practices

Allows C++ applications to communicate with IPFS. It implements IPFS API bindings for C++. See the documentation or the source code.

See also IPFS on GitHub.

Currently implemented methods:

  • block: get(), put(), stat()
  • config: get(), set(), replace()
  • dht: findpeer(), findprovs()
  • files: get(), add()
  • generic: id(), version()
  • object: new(), put(), get(), data(), links(), stat(), patch.addLink(), patch.rmLink(), patch.appendData(), patch.setData()
  • pin: add(), ls(), rm()
  • swarm: addrs(), connect(), disconnect(), peers()

Not implemented yet:

  • dag: get(), put()
  • dht: get(), put(), query()

TODO

  • Implement the above methods
  • Compare with the latest IPFS API bindings and implement any new methods that have been defined
  • Contributors are welcome!

Install

cmake /path/to/cpp-ipfs-api
make
make install

See the documentation for details.

Dependencies

Usage

#include <iostream>
#include <sstream>

#include <ipfs/client.h>

int main(int, char**) {
  std::stringstream contents;

  ipfs::Client client("localhost", 5001);

  client.FilesGet("/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/readme", &contents);

  std::cout << contents.str() << std::endl;

  return 0;
}
c++ -std=c++11 -I/path/to/header -L/path/to/lib -lipfs-api myprog.cc -o myprog

Contribute

Feel free to open issues and pull requests. Report vulnerabilities publicly, similar to other non-security issues.

The project adheres to the Google C++ Style Guide. Use clang-format to properly format the code when you submit patches.

Write tests for new code. Changes should not cause the code coverage to go down.

License

Copyright © 2016-2016 Vasil Dimov. The code is distributed under the MIT License.

cpp-ipfs-api's People

Contributors

daviddias avatar geertiebear avatar vasild avatar

Watchers

 avatar  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.