Skip to content

Commit

Permalink
[BIT-181] Suggested fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dario-ramos committed Jul 12, 2018
1 parent 2c4e4e2 commit 6f6081d
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 18 deletions.
2 changes: 1 addition & 1 deletion content/developer_guide/go/Go-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.



29 changes: 17 additions & 12 deletions content/developer_guide/restapi/introduction.md
Original file line number Diff line number Diff line change
@@ -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/)
Expand All @@ -18,33 +15,41 @@ 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.


## 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
Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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*

Expand Down
2 changes: 1 addition & 1 deletion content/developer_guide/toc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- name: Introduction
href: introduction.md
- name: Rest Api
- name: Rest API
href: restapi/introduction.md
items:
- name: Reference
Expand Down
2 changes: 1 addition & 1 deletion content/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion restapi/toc.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# [Bitprim API](bitprim-api.json)
# [Bitprim Insight API](bitprim-api.json)

0 comments on commit 6f6081d

Please sign in to comment.