From 6f6081d595b41001e0de18fe2562f775e092e588 Mon Sep 17 00:00:00 2001 From: dario-ramos Date: Thu, 12 Jul 2018 14:07:55 -0300 Subject: [PATCH] [BIT-181] Suggested fixes --- content/developer_guide/go/Go-interface.md | 2 +- .../developer_guide/restapi/introduction.md | 29 +++++++++++-------- content/developer_guide/toc.yml | 2 +- content/index.md | 2 +- index.md | 2 +- mkdocs.yml | 2 +- restapi/toc.md | 2 +- 7 files changed, 23 insertions(+), 18 deletions(-) diff --git a/content/developer_guide/go/Go-interface.md b/content/developer_guide/go/Go-interface.md index f36d486..0fbcb42 100644 --- a/content/developer_guide/go/Go-interface.md +++ b/content/developer_guide/go/Go-interface.md @@ -19,7 +19,7 @@ See [the source in Github](https://github.com/bitprim/bitprim-go/tree/master/bit --- -One characteristic that sets Go apart from, say, Python, is the ease with which a REST API can be created and tested from scratch. This is a very useful feature in today's web-centric world, and in order to make things even easier for Go developers, a REST api is also offered in this interface. See [here](https://github.com/bitprim/bitprim-go/tree/master/rest-api) for an example of how to start an http server which hosts it and can be consumed from Postman, Curl or a browser and thus easily integrated into any web application. +One characteristic that sets Go apart from, say, Python, is the ease with which a Rest API can be created and tested from scratch. This is a very useful feature in today's web-centric world, and in order to make things even easier for Go developers, a Rest api is also offered in this interface. See [here](https://github.com/bitprim/bitprim-go/tree/master/rest-api) for an example of how to start an http server which hosts it and can be consumed from Postman, Curl or a browser and thus easily integrated into any web application. diff --git a/content/developer_guide/restapi/introduction.md b/content/developer_guide/restapi/introduction.md index 7111386..467c301 100644 --- a/content/developer_guide/restapi/introduction.md +++ b/content/developer_guide/restapi/introduction.md @@ -1,9 +1,6 @@ # Introduction -*Bitprim Insight* -> Multi-Cryptocurrency _Rest_ API. - -*Bitprim Insight* is a REST API written in _C#_ with .NET Core 2.x which exposes methods matching the insight API interface +*Bitprim Insight* is a Rest API written in _C#_ with .NET Core 2.x which exposes methods matching the insight API interface. Bitprim Insight supports the following cryptocurrencies: * [Bitcoin Cash](https://www.bitcoincash.org/) @@ -18,7 +15,9 @@ Bitprim Insight supports the following cryptocurrencies: - [.NET Core 2.0 SDK](https://www.microsoft.com/net/download/) -In case there are no pre-built binaries for your platform, conan will automatically try to build from source code. In such a scenario, the following requirements must be added to the previous ones: +Although *Bitprim Insight* is a .NET managed API, it is build on top of an unmanaged C++ library. A binary of said library is retrieved by Conan +automatically when building *Bitprim Insight*. But, in case there are no pre-built binaries for your platform, Conan will automatically try to +download the native source code and build the native library locally. In such a scenario, the following requirements must be added to the previous ones: - C++11 Conforming Compiler. - [CMake](https://cmake.org/) building tool, version 3.4 or newer. @@ -26,25 +25,31 @@ In case there are no pre-built binaries for your platform, conan will automatica ## Building Procedure -The *Bitprim* libraries can be installed using conan (see below) on Linux, macOS, FreeBSD, Windows and others. These binaries are pre-built for the most usual operating system/compiler combinations and are downloaded from an online repository. If there are no pre-built binaries for your platform, conan will attempt to build from source during the installation. +The *Bitprim Insight* API can be built on any system supported by the .NET Core 2.0 SDK. + +1. Get source + +``` +git clone https://github.com/bitprim/bitprim-insight.git +``` -1. Build +2. Build In the project folder run: For Bitcoin Cash ``` -dotnet build /property:Platform=x64 /p:BCH=true -c Release -f netcoreapp2.0 -v normal +dotnet build /p:BCH=true -c Release -v normal ``` For Bitcoin ``` -dotnet build /property:Platform=x64 /p:BTC=true -c Release -f netcoreapp2.0 -v normal +dotnet build /p:BTC=true -c Release -v normal ``` -2. Run +3. Run ``` dotnet bin/x64/Release/netcoreapp2.0/bitprim.insight.dll --server.port=3000 --server.address=0.0.0.0 @@ -73,7 +78,7 @@ dotnet bin/x64/Release/netcoreapp2.0/published/bitprim.insight.dll --server.port ## Configuration Options -You need to create an appsettings.json file in the build directory to run the application. You can use appsettings.example.json as a starting point. +You can create an appsettings.json file in the build directory to run the application. You can use appsettings.example.json as a starting point. Eg. @@ -160,7 +165,7 @@ In **Forwarder** mode, the application only relays the request to a **Full Node* **ApiPrefix**: Defines the name of the url segment where you expose the api methods. ``` -http://blockdozer.com/[ApiPrefix]/blocks/ +http://[DomainUrl]/[ApiPrefix]/blocks/ ``` *Default value:api* diff --git a/content/developer_guide/toc.yml b/content/developer_guide/toc.yml index 88e4f5a..7f8638e 100644 --- a/content/developer_guide/toc.yml +++ b/content/developer_guide/toc.yml @@ -1,6 +1,6 @@ - name: Introduction href: introduction.md -- name: Rest Api +- name: Rest API href: restapi/introduction.md items: - name: Reference diff --git a/content/index.md b/content/index.md index 51532ea..d728d58 100644 --- a/content/index.md +++ b/content/index.md @@ -24,4 +24,4 @@ The platform includes: * C Interface * C++ Interface * Interfaces for Go, Python, Node, C\#, Rust and Eiffel -* Full REST API implementation, compatible with insight API +* Full Rest API implementation, compatible with insight API diff --git a/index.md b/index.md index 5fe57fa..3fc94d2 100644 --- a/index.md +++ b/index.md @@ -24,4 +24,4 @@ The platform includes: * C Interface * C++ Interface * Interfaces for Go, Python, Node, C\#, Rust and Eiffel -* Full REST API implementation, compatible with insight API +* Full Rest API implementation, compatible with insight API diff --git a/mkdocs.yml b/mkdocs.yml index 6d09615..a091be7 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -20,7 +20,7 @@ pages: - Release Notes: user_guide/releases_notes.md - Developer Guide: - Introduction: developer_guide/introduction.md - - Rest Api: developer_guide/restapi/introduction.md + - Rest API: developer_guide/restapi/introduction.md - .Net: - Introduction: developer_guide/dotnet/dotnet-Interface.md diff --git a/restapi/toc.md b/restapi/toc.md index 616bce0..d4c0d6a 100644 --- a/restapi/toc.md +++ b/restapi/toc.md @@ -1 +1 @@ -# [Bitprim API](bitprim-api.json) +# [Bitprim Insight API](bitprim-api.json)