diff --git a/README.md b/README.md index b153060..1a72821 100644 --- a/README.md +++ b/README.md @@ -11,21 +11,15 @@ The official lighthouse instance is live at https://lighthouse.lbry.io 1. Elasticsearch as a backend db server. 2. LBRYimport, an importer that imports the claims into the Elasticsearch database. 3. Lighthouse API server, which serves the API and does all calculations about what to send to the end user. -### API Documentation / Usage example -To make a simple search by string: -``` -https://lighthouse.lbry.io/search?s=stringtosearch -``` -To get autocomplete suggestions: -``` -https://lighthouse.lbry.io/autocomplete?s=stringtocomp -``` +### API Documentation + [The full API documentation](https://lbryio.github.io/lighthouse/) ## Installation ### Prerequisites * [Node v8](https://nodejs.org/en/download/) * [Yarn](https://yarnpkg.com/en/docs/install) +* [Python 2.7](https://www.python.org/downloads/) * [Elasticsearch](https://www.elastic.co/downloads/elasticsearch) @@ -33,6 +27,11 @@ https://lighthouse.lbry.io/autocomplete?s=stringtocomp ``` git clone https://github.com/lbryio/lighthouse ``` +>Grab the latest release of lbrycrd here: + +[Download lbrycrd](https://github.com/lbryio/lbrycrd/releases) +>Create a lbrycrd config file at ~/.lbrycrd/lbrycrd.conf which contains rpcuser,rpcpassword and rpcport. Then run lbrycrd in the background with that config file. + >Make sure elasticsearch is running and run (from the lighthouse dir): ``` ./gendb.sh @@ -41,6 +40,10 @@ git clone https://github.com/lbryio/lighthouse ``` yarn install --production=false ``` +>Start an instance of the decoder: +``` +cd decoder && pip install -r requirements.txt && python decoder.py +``` >Build and run Lighthouse: ``` yarn run prod diff --git a/docs/index.html b/docs/index.html index 41bf3ef..c9bc11c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -15,10 +15,10 @@ +.sc-gwVKww {} .jtxFSh{position:absolute;left:20px;height:1.8em;width:0.9em;} .jtxFSh path{fill:primary:#333333;secondary:#808080;} -

Lighthouse (0.0.1)

Download OpenAPI specification:Download

LBRY Inc: filip@lbry.io URL: https://lbry.io License: MIT

Lighthouse is a search engine for the LBRY blockchain based on elasticsearch, chainquery and Node.JS.

-

Search API

Returns all the searches matching the search query

Returns all the searches matching the search query.

-
query Parameters
s
required
string

The search text

-
channel
string

The channel to search, if none, will return all search results

-
size
integer

The amount of results to return at max

-
from
integer

The number to start from, good for pagination

-
nsfw
boolean

If search should return nsfw content or not.

-

Responses

200

The search API returns an array of the found matching search items.

-
get /search
https://lighthouse.lbry.io/search

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Autocomplete API

Returns an array of autocompleted strings.

Returns an array of autocompleted strings.

-
query Parameters
s
required
string

The string to be autocompleted.

-

Responses

200

The autocomplete API returns an array of the found matching autocompleted strings.

-
get /autocomplete
https://lighthouse.lbry.io/autocomplete

Response samples

application/json
Copy
Expand all Collapse all
[
  • "lbryisawesome"
]

Status API

Returns the current status of the lighthouse insta

Returns the current status of the lighthouse instance.

-

Responses

200

Returns the current status of the lighthouse instance.

-
get /status
https://lighthouse.lbry.io/status

Response samples

application/json
Copy
Expand all Collapse all
{
  • "spaceUsed": "632.3MB",
  • "claimsInIndex": 97615085,
  • "totSearches": 100000
}
+ " fill="currentColor">

Lighthouse (0.0.1)

Download OpenAPI specification:Download

LBRY Inc: filip@lbry.io URL: https://lbry.io License: MIT

Lighthouse is a search engine for the LBRY blockchain based on elasticsearch, chainquery and Node.JS.

+

Search API

Returns all the searches matching the search query

Returns all the searches matching the search query.

+
query Parameters
s
required
string

The search text

+
channel
string

The channel to search, if none, will return all search results

+
size
integer

The amount of results to return at max

+
from
integer

The number to start from, good for pagination

+
nsfw
boolean

If search should return nsfw content or not.

+
contentType
string

Filter by MIME type.

+
mediaType
string

Filter by media type, can be audio, video, image, application, text or cad.

+
claimType
string

Return channels or files only, value can be 'channel' or 'file'.

+

Responses

200

The search API returns an array of the found matching search items.

+
get /search
https://lighthouse.lbry.io/search

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Autocomplete API

Returns an array of autocompleted strings.

Returns an array of autocompleted strings.

+
query Parameters
s
required
string

The string to be autocompleted.

+

Responses

200

The autocomplete API returns an array of the found matching autocompleted strings.

+
get /autocomplete
https://lighthouse.lbry.io/autocomplete

Response samples

application/json
Copy
Expand all Collapse all
[
  • "lbryisawesome"
]

Status API

Returns the current status of the lighthouse insta

Returns the current status of the lighthouse instance.

+

Responses

200

Returns the current status of the lighthouse instance.

+
get /status
https://lighthouse.lbry.io/status

Response samples

application/json
Copy
Expand all Collapse all
{
  • "spaceUsed": "632.3MB",
  • "claimsInIndex": 97615085,
  • "totSearches": 100000
}