gitHubServer.js
- Version:
-
- 2.0.0
- Copyright:
-
- 2024 Mediumroast, Inc. All rights reserved.
- License:
-
- Apache-2.0
- Source:
Example
import {Companies, Interactions, Users, Billings} from './api/gitHubServer.js'
const companies = new Companies(token, org, processName)
const interactions = new Interactions(token, org, processName)
const users = new Users(token, org, processName)
const billings = new Billings(token, org, processName)
const allCompanies = await companies.getAll()
const allInteractions = await interactions.getAll()
const allUsers = await users.getAll()
const allBillings = await billings.getAll()
const company = await companies.findByName('myCompany')
const interaction = await interactions.findByName('myInteraction')
const user = await users.findByName('myUser')
Requires
- module:GitHubFunctions
- module:crypto
- module:fs
- module:path
- module:fileURLToPath
Classes
Methods
-
<async, inner> createObj(objs)
-
Create objects in the mediumroast.io application
Parameters:
Name Type Description objsArray the objects to create in the backend
- Source:
Returns:
the results from the called function mrRest class
- Type
- Array
-
<async, inner> deleteObj(id, endpoint)
-
Delete an object in the mediumroast.io application
Parameters:
Name Type Description idString the object to be deleted in the mediumroast.io application
endpointString defaults to findbyx and is combined with credential and version info
- Source:
- To Do:
-
- implment when available in the backend
Returns:
the results from the called function mrRest class
- Type
- Array
-
<async, inner> findById(id, endpoint)
-
Find all objects by id from the mediumroast.io application
Parameters:
Name Type Description idString the id of the object to find
endpointString defaults to findbyx and is combined with credential and version info
- Deprecated:
-
- Yes
- Source:
Returns:
the results from the called function mrRest class
- Type
- Array
-
<async, inner> findByName(name)
-
Find all objects by name from the mediumroast.io application
Parameters:
Name Type Description nameString the name of the object to find
- Source:
Returns:
the results from the called function mrRest class
- Type
- Array
-
<async, inner> findByX(attribute, value)
-
Find all objects by attribute and value pair from the mediumroast.io application
Parameters:
Name Type Description attributeString the attribute used to find objects
valueString the value for the defined attribute
- Source:
Returns:
the results from the called function mrRest class
- Type
- Array
-
<async, inner> getAll()
-
Get all objects from the mediumroast.io application
- Source:
Returns:
the results from the called function mrRest class
- Type
- Array
-
<async, inner> linkObj(objs)
-
Link objects in the mediumroast.io application
Parameters:
Name Type Description objsArray the objects to link in the backend
- Source:
Returns:
the results from the called function mrRest class
- Type
- Array
-
<async, inner> updateObj(obj, endpoint)
-
Update an object in the mediumroast.io application
Parameters:
Name Type Description objObject the object to update in the backend which includes the id and, the attribute and value to be updated
endpointString defaults to findbyx and is combined with credential and version info
- Source:
Returns:
the results from the called function mrRest class
- Type
- Array
Mediumroast for GitHub SDK and CLI