Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/kd_clients/mod.ts>OrgClient

Various HTTP clients for miscellaneous use.
Latest
class OrgClient
extends GitHubClient
import { OrgClient } from "https://deno.land/x/kd_clients@v1.0.0-preview.14/mod.ts";

Provides a client for interacting with issues.

Constructors

new
OrgClient(ownerName: string, token: string)

Initializes a new instance of the OrgClient class.

Methods

private
getAll(
privateOrPublic: MemberVisibility,
page?,
qtyPerPage?,
role?: OrgMemberRole,
): Promise<[UserModel[], Response]>

Gets the given page of public or private members where the quantity of the page is the the given qtyPerPage, where the members have the given qtyPerPage, where the members have the given member role.

exists(): Promise<boolean>

Gets a value indicating whether or not an organization exists with a name that matches the given orgName.

getAllAdminMembers(): Promise<UserModel[]>

Gets a list of all public and private members for an organization with a name that matches the OrgClient.ownerName.

getAllOrgMembers(): Promise<UserModel[]>

Gets a list of all the public and private members with any role for an organization with a name that matches the OrgClient.ownerName.

getAllPrivateMembers(): Promise<UserModel[]>

Gets a list of all private members for an organization with a name that matches the OrgClient.ownerName and has any role.

getAllPublicMembers(): Promise<UserModel[]>

Gets a list of all the public members for an organization with a name that has the given OrgClient.ownerName with an OrgMemberRole.admin role.

getPrivateAdminMembers(): Promise<UserModel[]>

Gets a list of all private members for an organization with a name that matches the OrgClient.ownerName that has the given OrgMemberRole.admin role.

getPrivateMembers(
page?,
qtyPerPage?,
role?: OrgMemberRole,
): Promise<UserModel[]>

Gets the given page of private members where the quantity of the page is the the given qtyPerPage, where the members have the given qtyPerPage, where the members have the given member role.

getPrivateNonAdminMembers(): Promise<UserModel[]>

Gets a list of all private members for an organization that matches the OrgClient.ownerName that has the OrgMemberRole.member role.

getPublicAdminMembers(): Promise<UserModel[]>

Gets a list of all public members for an organization with a name that matches the OrgClient.ownerName and has the given OrgMemberRole.admin role.

getPublicMembers(
page?,
qtyPerPage?,
role?: OrgMemberRole,
): Promise<UserModel[]>

Gets the given page of public members where the quantity of the page is the the given qtyPerPage, where the members have the given OrgMemberRole.role.

getPublicNonAdminMembers(): Promise<UserModel[]>

Gets a list of all public members for an organization with a name that matches the OrgClient.ownerName that does not have the given OrgMemberRole.admin role.

getVariables(options?: VariableOptions | VariableOptions[]): Promise<GitHubVarModel[]>

Gets a list of all the variables for an organization that matches the OrgClient.ownerName.

userIsOrgAdminMember(username: string): Promise<boolean>

Gets a value indicating whether or not a public or private user with a name that matches the given username is a member of an organization with a name that matches, the OrgClient.ownerName and has an admin role.

userIsOrgMember(username: string): Promise<boolean>

Gets a value indicating whether or not a user with a name that matches the given username, is a member of an organization with a name that matches the OrgClient.ownerName.