status-go/services/browsers
Ibrahem Khalil 5949ed2a44
Issue 13813 -- Use messenger ns for browser CRUD (#2801)
* Move browser CRUD to messenger ns

* Remove tests

* Create new endpoints for browsers CRUD

* Move tests to correct ns

* Lintil soup

* Fix tests

* Lint

* Bump status-go

Co-authored-by: Ibrahem Khalil <33176106+vampirekiddo@users.noreply.github.com>
2022-08-24 16:05:35 +02:00
..
README.md Add browsers API (#1523) 2019-07-17 08:28:37 +03:00
api.go Issue 13813 -- Use messenger ns for browser CRUD (#2801) 2022-08-24 16:05:35 +02:00
api_test.go Issue 13813 -- Use messenger ns for browser CRUD (#2801) 2022-08-24 16:05:35 +02:00
database.go Issue 13813 -- Use messenger ns for browser CRUD (#2801) 2022-08-24 16:05:35 +02:00
service.go Fix some tests and restore private/public RPC client 2021-07-20 10:57:38 +02:00

README.md

Browsers Service

Browser service provides read/write API for browser object.

To enable include browsers config part and add browsers to APIModules:

{
  "BrowsersConfig": {
    "Enabled": true,
  },
  APIModules: "browsers"
}

API

Enabling service will expose three additional methods:

browsers_addBrowser

Stores browser in the database. All fields are specified below:

{
  "browser-id": "1",
  "name": "first",
  "timestamp": 10,
  "dapp?": true,
  "history-index": 1,
  "history": [
    "one",
    "two"
  ]
}

browsers_getBrowsers

Reads all browsers, returns in the format specified above. List is sorted by timestamp.

browsers_deleteBrowser

Delete browser from database. Accepts browser id.