Blih

Blih

new Blih()

Blih API
Source:

Members

email :String

Email of the user
Source:
Type:
  • String

token :String

Token to use when communicating with the API
Source:
Type:
  • String

Methods

(async, static) ping() → {Number}

Ping the Blih server
Source:
Returns:
Type:
Number
the response time in milliseconds

(async) createRepository(repository, description) → {Promise}

Create a repository
Source:
Parameters:
Name Type Description
repository String Name of the new repository
description String A short description of the repository
Returns:
Type:
Promise
description

(async) deleteKey(key) → {String}

Delete an SSH key
Source:
Parameters:
Name Type Description
key String name of the key (usually corresponds to the key comment)
Returns:
Type:
String
a message confirming deletion

(async) deleteRepository(repository) → {Promise}

Delete a repository
Source:
Parameters:
Name Type Description
repository String Name of the repository to delete
Returns:
Type:
Promise
description

(async) getACL() → {Array.<ACL>}

Get ACL of a repository
Source:
Returns:
Type:
Array.<ACL>
the collaborators on this repository

(async) listKeys() → {Array.<Key>}

List all SSH keys
Source:
Returns:
Type:
Array.<Key>
the public keys associated with your account

(async) listRepositories() → {Array.<PartialRepository>}

List repositories
Source:
Returns:
Type:
Array.<PartialRepository>
the repositories you own

(async) repositoryInfo() → {Repository}

Get information about a repository
Source:
Returns:
Type:
Repository
information about the repository

(async) setACL(repository, user, acl) → {String}

Set ACL for a repository
Source:
Parameters:
Name Type Description
repository String
user String
acl String one or many of 'a' (admin), 'r' (read) or 'w' (write)
Returns:
Type:
String
a message confirming ACL update

(async) uploadKey(key) → {String}

Upload an SSH key. Only RSA keys are supported.
Source:
Parameters:
Name Type Description
key String key contents (NOT the path to the file)
Returns:
Type:
String
a message confirming upload

(async) whoami() → {String}

Get your legacy identity This is only useful for accounts created prior to 2016 that used the old login format For newer users, this will simply return their email.
Source:
Returns:
Type:
String
the public keys associated with your account

Type Definitions

ACL

A collaborator associated with their rights on a repository
Properties:
Name Type Description
name String Name of the collaborator
rights String one or many of 'a' (admin), 'r' (read) or 'w' (write)
Source:
Type:
  • Object

Key

An SSH key
Properties:
Name Type Description
name String Name identifying the key (usually corresponds to the key comment)
data String Actual key contents
Source:
Type:
  • Object

PartialRepository

A brief summary of a repository
Properties:
Name Type Description
name String The name of the repository
url String The URL that the API uses for this repository
uuid String UUID of the repository
Source:
Type:
  • Object

Repository

A detailed summary of a repository
Properties:
Name Type Description
name String The name of the repository
url String The URL that the API uses for this repository
creation_time Number POSIX creation time of the repository
uuid String UUID of the repository
description String UUID of the repository
public boolean Visibility of the repository
Source:
Type:
  • Object