Members
Methods
(async, static) ping() → {Number}
Ping the Blih server
Returns:
- Type:
-
Number
the response time in milliseconds
(async) createRepository(repository, description) → {Promise}
Create a repository
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
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
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
Returns:
- Type:
-
Array.<ACL>
the collaborators on this repository
(async) listKeys() → {Array.<Key>}
List all SSH keys
Returns:
- Type:
-
Array.<Key>
the public keys associated with your account
(async) listRepositories() → {Array.<PartialRepository>}
List repositories
Returns:
- Type:
-
Array.<PartialRepository>
the repositories you own
(async) repositoryInfo() → {Repository}
Get information about a repository
Returns:
- Type:
-
Repository
information about the repository
(async) setACL(repository, user, acl) → {String}
Set ACL for a repository
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.
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.
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) |
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 |
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 |
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 |
Type:
-
Object