-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #174 from ArkEcosystem/release/v1.4.0-arduino
release: 1.4.0-arduino
- Loading branch information
Showing
21 changed files
with
717 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
* @faustbrian @kristjank @supaiku0 | ||
* @faustbrian @kristjank @supaiku0 @sleepdefic1t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,26 +6,25 @@ | |
|
||
> A simple C++ API client for the Ark Blockchain. | ||
[![Build Status](https://badgen.now.sh/circleci/github/ArkEcosystem/cpp-client)](https://circleci.com/gh/ArkEcosystem/cpp-client) | ||
[![Codecov](https://badgen.now.sh/codecov/c/github/arkecosystem/cpp-client)](https://codecov.io/gh/arkecosystem/cpp-client) | ||
[![Latest Version](https://badgen.now.sh/github/release/ArkEcosystem/cpp-client)](https://github.com/ArkEcosystem/cpp-client/releases) | ||
[![License: MIT](https://badgen.now.sh/badge/license/MIT/green)](https://opensource.org/licenses/MIT) | ||
[![Test Actions](https://github.com/ArkEcosystem/cpp-client/workflows/Test/badge.svg)](https://github.com/ArkEcosystem/cpp-client/actions) | ||
[![Coverage Actions](https://github.com/ArkEcosystem/cpp-client/workflows/Coverage/badge.svg)](https://github.com/ArkEcosystem/cpp-client/actions) | ||
[![Latest Version](https://badgen.now.sh/github/release/ArkEcosystem/cpp-client?labelColor=black)](https://github.com/ArkEcosystem/cpp-client/releases) | ||
[![License: MIT](https://badgen.now.sh/badge/license/MIT/green?labelColor=black)](https://opensource.org/licenses/MIT) | ||
|
||
> Lead Maintainer: [Simon Downey](https://github.com/sleepdefic1t) | ||
## Documentation | ||
|
||
You can find installation instructions and detailed instructions on how to use this package at the [dedicated documentation site](https://docs.ark.io/sdk/clients/cpp.html). | ||
You can find installation instructions and detailed instructions on how to use this package at the [dedicated documentation site](https://docs.ark.io/sdk/clients/usage.html). | ||
|
||
## Security | ||
|
||
If you discover a security vulnerability within this package, please send an e-mail to [email protected]. All security vulnerabilities will be promptly addressed. | ||
|
||
## Credits | ||
|
||
- [Simon Downey](https://github.com/sleepdeficit) | ||
- [Chris Johnson](https://github.com/ciband) | ||
- [supaiku0](https://github.com/supaiku0) | ||
- [All Contributors](../../../../contributors) | ||
This project exists thanks to all the people who [contribute](../../contributors). | ||
|
||
## License | ||
|
||
[MIT](LICENSE) © [ArkEcosystem](https://ark.io) | ||
[MIT](LICENSE) © [ARK Ecosystem](https://ark.io) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This file is part of Ark Cpp Client. | ||
# | ||
# (c) Ark Ecosystem <[email protected]> | ||
|
@@ -38,7 +37,10 @@ SRC_API_DIR=${SRC_DIR}/api | |
|
||
INCLUDE_BLOCKCHAIN_DIR=${INCLUDE_DIR}/api/blockchain | ||
INCLUDE_BLOCKS_DIR=${INCLUDE_DIR}/api/blocks | ||
INCLUDE_BUSINESSES_DIR=${INCLUDE_DIR}/api/businesses | ||
INCLUDE_BRIDGECHAINS_DIR=${INCLUDE_DIR}/api/bridgechains | ||
INCLUDE_DELEGATES_DIR=${INCLUDE_DIR}/api/delegates | ||
INCLUDE_LOCKS_DIR=${INCLUDE_DIR}/api/locks | ||
INCLUDE_NODE_DIR=${INCLUDE_DIR}/api/node | ||
INCLUDE_PEERS_DIR=${INCLUDE_DIR}/api/peers | ||
INCLUDE_ROUNDS_DIR=${INCLUDE_DIR}/api/rounds | ||
|
@@ -48,7 +50,10 @@ INCLUDE_WALLETS_DIR=${INCLUDE_DIR}/api/wallets | |
|
||
SRC_BLOCKCHAIN_DIR=${SRC_DIR}/api/blockchain | ||
SRC_BLOCKS_DIR=${SRC_DIR}/api/blocks | ||
SRC_BUSINESSES_DIR=${SRC_DIR}/api/businesses | ||
SRC_BRIDGECHAINS_DIR=${SRC_DIR}/api/bridgechains | ||
SRC_DELEGATES_DIR=${SRC_DIR}/api/delegates | ||
SRC_LOCKS_DIR=${SRC_DIR}/api/locks | ||
SRC_NODE_DIR=${SRC_DIR}/api/node | ||
SRC_PEERS_DIR=${SRC_DIR}/api/peers | ||
SRC_ROUNDS_DIR=${SRC_DIR}/api/rounds | ||
|
@@ -112,7 +117,10 @@ if [[ -d ${INCLUDE_DIR} ]]; then | |
|
||
mv ${INCLUDE_BLOCKCHAIN_DIR}/blockchain.hpp ${SRC_BLOCKCHAIN_DIR} | ||
mv ${INCLUDE_BLOCKS_DIR}/blocks.h ${SRC_BLOCKS_DIR} | ||
mv ${INCLUDE_BUSINESSES_DIR}/businesses.h ${SRC_BUSINESSES_DIR} | ||
mv ${INCLUDE_BRIDGECHAINS_DIR}/bridgechains.h ${SRC_BRIDGECHAINS_DIR} | ||
mv ${INCLUDE_DELEGATES_DIR}/delegates.h ${SRC_DELEGATES_DIR} | ||
mv ${INCLUDE_LOCKS_DIR}/locks.h ${SRC_LOCKS_DIR} | ||
mv ${INCLUDE_NODE_DIR}/node.h ${SRC_NODE_DIR} | ||
mv ${INCLUDE_PEERS_DIR}/peers.h ${SRC_PEERS_DIR} | ||
mv ${INCLUDE_ROUNDS_DIR}/rounds.h ${SRC_ROUNDS_DIR} | ||
|
@@ -156,7 +164,10 @@ else | |
mkdir ${INCLUDE_API_DIR} | ||
mkdir ${INCLUDE_BLOCKCHAIN_DIR} | ||
mkdir ${INCLUDE_BLOCKS_DIR} | ||
mkdir ${INCLUDE_BUSINESSES_DIR} | ||
mkdir ${INCLUDE_BRIDGECHAINS_DIR} | ||
mkdir ${INCLUDE_DELEGATES_DIR} | ||
mkdir ${INCLUDE_LOCKS_DIR} | ||
mkdir ${INCLUDE_NODE_DIR} | ||
mkdir ${INCLUDE_PEERS_DIR} | ||
mkdir ${INCLUDE_ROUNDS_DIR} | ||
|
@@ -172,7 +183,10 @@ else | |
|
||
mv ${SRC_BLOCKCHAIN_DIR}/blockchain.hpp ${INCLUDE_BLOCKCHAIN_DIR} | ||
mv ${SRC_BLOCKS_DIR}/blocks.h ${INCLUDE_BLOCKS_DIR} | ||
mv ${SRC_BUSINESSES_DIR}/businesses.h ${INCLUDE_BUSINESSES_DIR} | ||
mv ${SRC_BRIDGECHAINS_DIR}/bridgechains.h ${INCLUDE_BRIDGECHAINS_DIR} | ||
mv ${SRC_DELEGATES_DIR}/delegates.h ${INCLUDE_DELEGATES_DIR} | ||
mv ${SRC_LOCKS_DIR}/locks.h ${INCLUDE_LOCKS_DIR} | ||
mv ${SRC_NODE_DIR}/node.h ${INCLUDE_NODE_DIR} | ||
mv ${SRC_PEERS_DIR}/peers.h ${INCLUDE_PEERS_DIR} | ||
mv ${SRC_ROUNDS_DIR}/rounds.h ${INCLUDE_ROUNDS_DIR} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** | ||
* This file is part of Ark Cpp Client. | ||
* | ||
* (c) Ark Ecosystem <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
**/ | ||
|
||
#include "api/bridgechains/bridgechains.h" | ||
|
||
namespace Ark { | ||
namespace Client { | ||
namespace api { | ||
|
||
std::string Bridgechains::get(const char* bridgechainId) { | ||
return http_->get(paths::Bridgechains::get(this->host_, bridgechainId).c_str()); | ||
} | ||
|
||
/**/ | ||
|
||
std::string Bridgechains::all(const char* const query) { | ||
return http_->get(paths::Bridgechains::all(this->host_, query).c_str()); | ||
} | ||
|
||
/**/ | ||
|
||
std::string Bridgechains::search( | ||
const std::map<std::string, std::string> &bodyParameters, | ||
const char* const query) { | ||
const auto searchPathPair = paths::Bridgechains::search(this->host_, | ||
bodyParameters, | ||
query); | ||
return http_->post(searchPathPair.first.c_str(), | ||
searchPathPair.second.c_str()); | ||
} | ||
|
||
} // namespace api | ||
} // namespace Client | ||
} // namespace Ark |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/** | ||
* This file is part of Ark Cpp Client. | ||
* | ||
* (c) Ark Ecosystem <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
**/ | ||
|
||
#ifndef BRIDGECHAINS_H | ||
#define BRIDGECHAINS_H | ||
|
||
#include <map> | ||
#include <string> | ||
|
||
#include "api/base.h" | ||
#include "api/paths.h" | ||
|
||
namespace Ark { | ||
namespace Client { | ||
namespace api { // NOLINT | ||
|
||
class IBridgechains : public Base { | ||
public: | ||
virtual ~IBridgechains() {} | ||
virtual std::string get(const char* const bridgechainId) = 0; | ||
virtual std::string all(const char* const query) = 0; | ||
virtual std::string search(const std::map<std::string, std::string>& bodyParameters, const char* const query) = 0; | ||
|
||
protected: | ||
IBridgechains(Host& host, IHTTP& http) : Base(host, http) {} | ||
}; | ||
|
||
/**/ | ||
|
||
class Bridgechains : public IBridgechains { | ||
public: | ||
Bridgechains(Host& host, IHTTP& http) : IBridgechains(host, http) {} | ||
|
||
std::string get(const char* const bridgechainId) override; | ||
std::string all(const char* const query) override; | ||
std::string search(const std::map<std::string, std::string>& bodyParameters, const char* const query) override; | ||
}; | ||
|
||
} // namespace api | ||
} // namespace Client | ||
} // namespace Ark | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/** | ||
* This file is part of Ark Cpp Client. | ||
* | ||
* (c) Ark Ecosystem <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
**/ | ||
|
||
#include "api/businesses/businesses.h" | ||
|
||
namespace Ark { | ||
namespace Client { | ||
namespace api { | ||
|
||
std::string Businesses::get(const char* businessId) { | ||
return http_->get(paths::Businesses::get(this->host_, businessId).c_str()); | ||
} | ||
|
||
/**/ | ||
|
||
std::string Businesses::all(const char* const query) { | ||
return http_->get(paths::Businesses::all(this->host_, query).c_str()); | ||
} | ||
|
||
/**/ | ||
|
||
std::string Businesses::bridgechains(const char* businessId, | ||
const char* const query) { | ||
return http_->get(paths::Businesses::bridgechains(this->host_, | ||
businessId, | ||
query).c_str()); | ||
} | ||
|
||
/**/ | ||
|
||
std::string Businesses::search( | ||
const std::map<std::string, std::string> &bodyParameters, | ||
const char* const query) { | ||
const auto searchPathPair = paths::Businesses::search(this->host_, | ||
bodyParameters, | ||
query); | ||
return http_->post(searchPathPair.first.c_str(), | ||
searchPathPair.second.c_str()); | ||
} | ||
|
||
} // namespace api | ||
} // namespace Client | ||
} // namespace Ark |
Oops, something went wrong.