C# 클래스 SchooxSharp.Api.Clients.Users

The following requests relate to getting information about users via the Schoox Academy API. Note: All requests must be Authenticated. Access Level for all requests: Administrators, Training Managers, Region and Location Managers. Depending on the role the requests return data either for all users (Access level: Administrators and Training Managers) or for users that belong to a certain region or location (Access Level: Region Managers, Local Managers). You can simulate a user's view by his/her schooX ID.
상속: SchooxApiBase
파일 보기 프로젝트 열기: jamesbar2/SchooxSharp 1 사용 예제들

Private Properties

프로퍼티 타입 설명

공개 메소드들

메소드 설명
AddAboveUnitsToUser ( int userId, List aboveUnitIds, string externalId = null, string title = null ) : SchooxResponse

Adds Aboves Units to a given User by an array of Above Unit Ids.

AddNewAboveUnit ( AboveUnit aboveUnit ) : SchooxResponse

Creates a new Above Unit and connects it to a Type.

AddNewJob ( NewJob job ) : SchooxResponse

Creates a new job

AddNewType ( string typeName ) : SchooxResponse

Creates a new Type.

AddNewUnit ( NewUnit unit ) : SchooxResponse

Creates a new Unit and connects it to Above Units, via an array of Above Unit ids (above_ids) or an array of Above Unit names (above_names).

AddUnitsToUser ( int userId, List unitIds, string externalId = null, string title = null ) : SchooxResponse

Adds Units to a given User by an array of Unit Ids.

ArchiveUnit ( int unitId, string title = null ) : SchooxResponse

Archive a Unit.

BulkAddNewAboveUnits ( List aboveUnits ) : SchooxResponse

Creates multiple Above Units (maximum of 100) via a single request.

BulkAddNewJobs ( List jobs ) : SchooxResponse

Creates multiple academy jobs via a single request

BulkAddNewTypes ( List typeNames ) : SchooxResponse

Creates multiple Types via a single request.

BulkAddNewUnits ( List units ) : SchooxResponse

Creates multiple Units (maximum of 100) via a single request.

BulkCreateAndAddUsers ( List users ) : SchooxResponse

Creates and adds multiple users (maximum of 10) to the academy via a single request. Password is mandatory.

BulkInviteUsers ( List users ) : SchooxResponse

Adds a user through an academy invitation. You can simulate the inviting user by adding his/her schooX ID.

CreateAndAddUser ( NewUser user ) : SchooxResponse

Creates and adds a user to the academy. Password is mandatory.

DeleteAboveUnit ( int aboveId, string title = null ) : SchooxResponse

Changes the name and/or the type of an Above Unit.

DeleteArchivedUnit ( int unitId, string title = null ) : SchooxResponse

Deletes a specific Archived Unit.

DeleteJob ( int jobId, string title = null ) : SchooxResponse

Deletes a specified job. It also removes the job from all assigned users.

DeleteType ( int typeId ) : SchooxResponse

Deletes a specified type.

DeleteUnit ( int unitId, string title = null ) : SchooxResponse

Deletes a specific Unit.

EditAboveUnit ( int aboveId, AboveUnit aboveUnit, string title = null ) : SchooxResponse

Changes the name and/or the type of an Above Unit.

EditJob ( int jobId, NewJob job, string title = null ) : SchooxResponse

Changes the name and/or the report id of a job.

EditType ( int typeId, string typeName ) : SchooxResponse

Changes the name of a Type.

EditUnit ( int unitId, NewUnit unit, string title = null ) : SchooxResponse

Changes the name and/or the above units of a Unit.

EditUser ( int userId, NewUser user, string externalId = null ) : SchooxResponse

Edit the firstname, lastname, email or password of a User.

GetAboveUnits ( int typeId = null, string search = null, int start = null, int limit = null ) : SchooxResponse>

Returns a list of Above Units (max. 100/request) of your Academy.

GetAndEnumerateAllUsers ( string role, string past = null, string search = null, int aboveId = null, int unitId = null, int jobId = null, int limit = 1000 ) : List

Iterates through all "pages" of users to build a list of all users in the system. WARNING: This function should only be used on smaller user lists, writing your own enumerable or async function is a more efficient route than this function. Also, any failures will be ignored.

GetArchivedUnits ( string search = null, string searchAbove = null, int aboveId = null, int start = null, int limit = null ) : SchooxResponse>

Returns a list of Archived Units of your Academy.

GetDetailsOfUser ( int userId, string externalId = null ) : SchooxResponse

Returns data for a specific user like first and last name, email, role, region, location, job code and his/her current status in the academy.

GetJobs ( string search = null, int start = null, int limit = null ) : SchooxResponse>

Returns a list with all jobs of your Academy.

GetTypes ( ) : SchooxResponse>

Returns a list of all Types of your Academy.

GetUnits ( string search = null, string searchAbove = null, int aboveId = null, int start = null, int limit = null ) : SchooxResponse>

Returns a list of Units of your Academy.

GetUsers ( string role, string past = null, string search = null, int aboveId = null, int unitId = null, int jobId = null, int start = null, int limit = null ) : SchooxResponse>

Returns a list of academy's users. A role must be specified. Available values are: employee, customer, instructor & member.

InviteUser ( NewUser user ) : SchooxResponse

Adds a user through an academy invitation. You can simulate the inviting user by adding his/her schooX ID.

ReactivateUser ( int userId ) : SchooxResponse

Reactivates a Past Employee as Employee. You can use the User Id or his/her external_id

ReactivateUser ( string externalId ) : SchooxResponse

Reactivates a Past Employee as Employee. You can use the User Id or his/her external_id

RemoveAboveUnitFromUser ( int userId, int aboveId, string externalId = null, string title = null ) : SchooxResponse

Removes an Above Unit from a given User

RemoveUnitsFromUser ( int userId, int unitId, string externalId = null, string title = null ) : SchooxResponse

Adds Units to a given User by an array of Unit Ids.

RemoveUser ( int userId, string externalId = null ) : SchooxResponse

Removes a user from the academy.

UnarchiveUnit ( int unitId, string title = null ) : SchooxResponse

Unarchive a Unit.

UpdateUserJobs ( int userId, List jobs, string externalId = null ) : SchooxResponse

Edit the jobs of a given user by an array of units/above units & their job Ids. User must be previously assigned to the specified units & above units.

UpdateUserRoles ( int userId, List roles, string externalId = null ) : SchooxResponse

Edit the roles of a given user. Available roles are (see Constants.Roles): admin, training_manager, content_manager, professional_instructor, hourly_worker

Users ( ) : System
Users ( ISchooxService service ) : System

메소드 상세

AddAboveUnitsToUser() 공개 메소드

Adds Aboves Units to a given User by an array of Above Unit Ids.
public AddAboveUnitsToUser ( int userId, List aboveUnitIds, string externalId = null, string title = null ) : SchooxResponse
userId int User to add above units to
aboveUnitIds List Above units to add
externalId string External ID of user to reactivate
title string Sets whether the id given is the current title. By default, the value is "false"
리턴 SchooxResponse

AddNewAboveUnit() 공개 메소드

Creates a new Above Unit and connects it to a Type.
public AddNewAboveUnit ( AboveUnit aboveUnit ) : SchooxResponse
aboveUnit AboveUnit Above unit to add
리턴 SchooxResponse

AddNewJob() 공개 메소드

Creates a new job
public AddNewJob ( NewJob job ) : SchooxResponse
job SchooxSharp.Api.Models.NewJob Job name, and report_id
리턴 SchooxResponse

AddNewType() 공개 메소드

Creates a new Type.
public AddNewType ( string typeName ) : SchooxResponse
typeName string Type name to add
리턴 SchooxResponse

AddNewUnit() 공개 메소드

Creates a new Unit and connects it to Above Units, via an array of Above Unit ids (above_ids) or an array of Above Unit names (above_names).
public AddNewUnit ( NewUnit unit ) : SchooxResponse
unit SchooxSharp.Api.Models.NewUnit Unit with names and above IDs
리턴 SchooxResponse

AddUnitsToUser() 공개 메소드

Adds Units to a given User by an array of Unit Ids.
public AddUnitsToUser ( int userId, List unitIds, string externalId = null, string title = null ) : SchooxResponse
userId int User to add units to
unitIds List Unit IDs to add
externalId string External ID of user to reactivate
title string Sets whether the id given is the current title. By default, the value is "false"
리턴 SchooxResponse

ArchiveUnit() 공개 메소드

Archive a Unit.
public ArchiveUnit ( int unitId, string title = null ) : SchooxResponse
unitId int Unit to archive
title string Sets whether the id given is the current title. By default, the value is "false"
리턴 SchooxResponse

BulkAddNewAboveUnits() 공개 메소드

Creates multiple Above Units (maximum of 100) via a single request.
public BulkAddNewAboveUnits ( List aboveUnits ) : SchooxResponse
aboveUnits List
리턴 SchooxResponse

BulkAddNewJobs() 공개 메소드

Creates multiple academy jobs via a single request
public BulkAddNewJobs ( List jobs ) : SchooxResponse
jobs List Jobs to be created
리턴 SchooxResponse

BulkAddNewTypes() 공개 메소드

Creates multiple Types via a single request.
public BulkAddNewTypes ( List typeNames ) : SchooxResponse
typeNames List Type names as a list
리턴 SchooxResponse

BulkAddNewUnits() 공개 메소드

Creates multiple Units (maximum of 100) via a single request.
public BulkAddNewUnits ( List units ) : SchooxResponse
units List Units to add
리턴 SchooxResponse

BulkCreateAndAddUsers() 공개 메소드

Creates and adds multiple users (maximum of 10) to the academy via a single request. Password is mandatory.
public BulkCreateAndAddUsers ( List users ) : SchooxResponse
users List Enumerable lists of users to be added, password is required. Use the static NewUserForAccount helper.
리턴 SchooxResponse

BulkInviteUsers() 공개 메소드

Adds a user through an academy invitation. You can simulate the inviting user by adding his/her schooX ID.
public BulkInviteUsers ( List users ) : SchooxResponse
users List Enumerable list of user objects to be invited, use the static NewUserForInvite helper.
리턴 SchooxResponse

CreateAndAddUser() 공개 메소드

Creates and adds a user to the academy. Password is mandatory.
public CreateAndAddUser ( NewUser user ) : SchooxResponse
user NewUser User object, password is required. Use the static NewUserForAccount helper.
리턴 SchooxResponse

DeleteAboveUnit() 공개 메소드

Changes the name and/or the type of an Above Unit.
public DeleteAboveUnit ( int aboveId, string title = null ) : SchooxResponse
aboveId int Above Unit to be deleted
title string Sets whether the id given is the current title. By default, the value is "false"
리턴 SchooxResponse

DeleteArchivedUnit() 공개 메소드

Deletes a specific Archived Unit.
public DeleteArchivedUnit ( int unitId, string title = null ) : SchooxResponse
unitId int Archived unit to delete
title string Sets whether the id given is the current title. By default, the value is "false"
리턴 SchooxResponse

DeleteJob() 공개 메소드

Deletes a specified job. It also removes the job from all assigned users.
public DeleteJob ( int jobId, string title = null ) : SchooxResponse
jobId int Job ID to be deleted
title string Sets whether the id given is the current title. By default, the value is "false"
리턴 SchooxResponse

DeleteType() 공개 메소드

Deletes a specified type.
public DeleteType ( int typeId ) : SchooxResponse
typeId int Type to delete
리턴 SchooxResponse

DeleteUnit() 공개 메소드

Deletes a specific Unit.
public DeleteUnit ( int unitId, string title = null ) : SchooxResponse
unitId int Unit to delete
title string Sets whether the id given is the current title. By default, the value is "false"
리턴 SchooxResponse

EditAboveUnit() 공개 메소드

Changes the name and/or the type of an Above Unit.
public EditAboveUnit ( int aboveId, AboveUnit aboveUnit, string title = null ) : SchooxResponse
aboveId int Above Unit ID to be edited
aboveUnit AboveUnit Updated AboveUnit object
title string Sets whether the id given is the current title. By default, the value is "false"
리턴 SchooxResponse

EditJob() 공개 메소드

Changes the name and/or the report id of a job.
public EditJob ( int jobId, NewJob job, string title = null ) : SchooxResponse
jobId int Job ID to be edited
job SchooxSharp.Api.Models.NewJob Updated job information
title string Sets whether the id given is the current title. By default, the value is "false"
리턴 SchooxResponse

EditType() 공개 메소드

Changes the name of a Type.
public EditType ( int typeId, string typeName ) : SchooxResponse
typeId int Type ID to edit
typeName string New type name
리턴 SchooxResponse

EditUnit() 공개 메소드

Changes the name and/or the above units of a Unit.
public EditUnit ( int unitId, NewUnit unit, string title = null ) : SchooxResponse
unitId int Unit to change
unit SchooxSharp.Api.Models.NewUnit Updated unit
title string Sets whether the id given is the current title. By default, the value is "false"
리턴 SchooxResponse

EditUser() 공개 메소드

Edit the firstname, lastname, email or password of a User.
public EditUser ( int userId, NewUser user, string externalId = null ) : SchooxResponse
userId int Users ID
user NewUser User to edit.
externalId string Sets whether the id given is the external_id of the User. By default, the value is "false"
리턴 SchooxResponse

GetAboveUnits() 공개 메소드

Returns a list of Above Units (max. 100/request) of your Academy.
public GetAboveUnits ( int typeId = null, string search = null, int start = null, int limit = null ) : SchooxResponse>
typeId int Filter Above Units by Type ID
search string Search by Above Unit title
start int Starting position
limit int Number of Above Units to return per request, up to maximum of 100,000. Default to 100
리턴 SchooxResponse>

GetAndEnumerateAllUsers() 공개 메소드

Iterates through all "pages" of users to build a list of all users in the system. WARNING: This function should only be used on smaller user lists, writing your own enumerable or async function is a more efficient route than this function. Also, any failures will be ignored.
public GetAndEnumerateAllUsers ( string role, string past = null, string search = null, int aboveId = null, int unitId = null, int jobId = null, int limit = 1000 ) : List
role string Role of users
past string List Past Employees if given role is "employee". Default value is "false"
search string Search by user's firstname or lastname
aboveId int Above Unit's ID
unitId int Unit's ID
jobId int Job's ID
limit int Max is 1,000; depending on your users connection, adjust this.
리턴 List

GetArchivedUnits() 공개 메소드

Returns a list of Archived Units of your Academy.
public GetArchivedUnits ( string search = null, string searchAbove = null, int aboveId = null, int start = null, int limit = null ) : SchooxResponse>
search string Search by Unit title
searchAbove string Filter by Above Unit title
aboveId int Filter Units by an Above Unit Id
start int Starting position
limit int Number of Units to return per page, up to maximum of 10,000. Default to 100
리턴 SchooxResponse>

GetDetailsOfUser() 공개 메소드

Returns data for a specific user like first and last name, email, role, region, location, job code and his/her current status in the academy.
public GetDetailsOfUser ( int userId, string externalId = null ) : SchooxResponse
userId int User's ID.
externalId string Sets whether the id given is the external_id of the User. By default, the value is "false"
리턴 SchooxResponse

GetJobs() 공개 메소드

Returns a list with all jobs of your Academy.
public GetJobs ( string search = null, int start = null, int limit = null ) : SchooxResponse>
search string Search by Job title
start int Starting position
limit int Max items returned per request. Default is 100
리턴 SchooxResponse>

GetTypes() 공개 메소드

Returns a list of all Types of your Academy.
public GetTypes ( ) : SchooxResponse>
리턴 SchooxResponse>

GetUnits() 공개 메소드

Returns a list of Units of your Academy.
public GetUnits ( string search = null, string searchAbove = null, int aboveId = null, int start = null, int limit = null ) : SchooxResponse>
search string Search by Unit title
searchAbove string Filter by Above Unit title
aboveId int Filter Units by an Above Unit Id
start int Starting position
limit int Number of Units to return per request, up to maximum of 100,000. Default to 100
리턴 SchooxResponse>

GetUsers() 공개 메소드

Returns a list of academy's users. A role must be specified. Available values are: employee, customer, instructor & member.
public GetUsers ( string role, string past = null, string search = null, int aboveId = null, int unitId = null, int jobId = null, int start = null, int limit = null ) : SchooxResponse>
role string Role of users
past string List Past Employees if given role is "employee". Default value is "false"
search string Search by user's firstname or lastname
aboveId int Above Unit's ID
unitId int Unit's ID
jobId int Job's ID
start int Starting Position
limit int Number of users to return per request, up to maximum of 1,000. Default to 100
리턴 SchooxResponse>

InviteUser() 공개 메소드

Adds a user through an academy invitation. You can simulate the inviting user by adding his/her schooX ID.
public InviteUser ( NewUser user ) : SchooxResponse
user NewUser User object to be invited, use the static NewUserForInvite helper.
리턴 SchooxResponse

ReactivateUser() 공개 메소드

Reactivates a Past Employee as Employee. You can use the User Id or his/her external_id
public ReactivateUser ( int userId ) : SchooxResponse
userId int User ID of user to reactivate
리턴 SchooxResponse

ReactivateUser() 공개 메소드

Reactivates a Past Employee as Employee. You can use the User Id or his/her external_id
public ReactivateUser ( string externalId ) : SchooxResponse
externalId string External ID of user to reactivate
리턴 SchooxResponse

RemoveAboveUnitFromUser() 공개 메소드

Removes an Above Unit from a given User
public RemoveAboveUnitFromUser ( int userId, int aboveId, string externalId = null, string title = null ) : SchooxResponse
userId int User to remove above units from
aboveId int Above unit to remove
externalId string External ID of user to reactivate
title string Sets whether the id given is the current title. By default, the value is "false"
리턴 SchooxResponse

RemoveUnitsFromUser() 공개 메소드

Adds Units to a given User by an array of Unit Ids.
public RemoveUnitsFromUser ( int userId, int unitId, string externalId = null, string title = null ) : SchooxResponse
userId int User to remove units from
unitId int Unit to remove
externalId string External ID of user to reactivate
title string Sets whether the id given is the current title. By default, the value is "false"
리턴 SchooxResponse

RemoveUser() 공개 메소드

Removes a user from the academy.
public RemoveUser ( int userId, string externalId = null ) : SchooxResponse
userId int User to remove
externalId string External ID of user to reactivate
리턴 SchooxResponse

UnarchiveUnit() 공개 메소드

Unarchive a Unit.
public UnarchiveUnit ( int unitId, string title = null ) : SchooxResponse
unitId int Unit to unarchive.
title string Sets whether the id given is the current title. By default, the value is "false"
리턴 SchooxResponse

UpdateUserJobs() 공개 메소드

Edit the jobs of a given user by an array of units/above units & their job Ids. User must be previously assigned to the specified units & above units.
public UpdateUserJobs ( int userId, List jobs, string externalId = null ) : SchooxResponse
userId int User to update
jobs List Jobs of the user (Models.UpdateUserJob)
externalId string External ID of user to reactivate
리턴 SchooxResponse

UpdateUserRoles() 공개 메소드

Edit the roles of a given user. Available roles are (see Constants.Roles): admin, training_manager, content_manager, professional_instructor, hourly_worker
public UpdateUserRoles ( int userId, List roles, string externalId = null ) : SchooxResponse
userId int
roles List
externalId string External ID of user to reactivate
리턴 SchooxResponse

Users() 공개 메소드

public Users ( ) : System
리턴 System

Users() 공개 메소드

public Users ( ISchooxService service ) : System
service ISchooxService
리턴 System