Esempio n. 1
0
 /// <summary>
 /// Gets all availability days for the current user.
 /// </summary>
 /// <returns>All availability days for the current user.</returns>
 public IEnumerable <UserAvailabilityDay> GetAvailability(string query)
 {
     return(CntRestHelper.Request <IEnumerable <UserAvailability> >(Constants.NTMOBILE_BASEURL + "/availability?q=" + query, _Client.UserName, _Client.Password).Data.SelectMany(a => a.Availability));
 }
Esempio n. 2
0
 /// <summary>
 /// Gets all availability blocks for the current user.
 /// </summary>
 /// <returns>All availability blocks for the current user.</returns>
 public IEnumerable <AvailabilityBlock> GetAvailabilityBlocks()
 {
     return(CntRestHelper.Request <IEnumerable <AvailabilityBlock> >(Constants.NTMOBILE_BASEURL + "/availability-block", _Client.UserName, _Client.Password).Data);
 }
Esempio n. 3
0
 /// <summary>
 /// Gets profile status of the current user.
 /// </summary>
 /// <returns>The profile status of the current user.</returns>
 public NTMobileAppProfileStatus GetUserProfileStatus()
 {
     return(CntRestHelper.Request <NTMobileAppProfileStatus>(Constants.NTMOBILE_BASEURL + "/user-profile-status", _Client.UserName, _Client.Password).Data);
 }
 /// <summary>
 /// Gets the current pay period.
 /// </summary>
 /// <returns>The current pay period.</returns>
 public DateRange GetCurrentPayPeriod()
 {
     return(CntRestHelper.Request <DateRange>(Constants.NTMOBILE_BASEURL + "/current-pay-period", _Client.UserName, _Client.Password).Data);
 }
Esempio n. 5
0
 /// <summary>
 /// Gets a placement.
 /// </summary>
 /// <param name="placementId">The placement identifier.</param>
 /// <returns>The placement.</returns>
 public Placement GetPlacement(int placementId)
 {
     return(CntRestHelper.Request <Placement>(Constants.NTMOBILE_BASEURL + "/placement/" + placementId, _Client.UserName, _Client.Password).Data);
 }
Esempio n. 6
0
 /// <summary>
 /// Gets a user.
 /// </summary>
 /// <param name="userId">The user identifier.</param>
 /// <returns>The user.</returns>
 public User GetUser(int userId)
 {
     return(CntRestHelper.Request <User>(Constants.NTMOBILE_BASEURL + "/user/" + userId, _Client.UserName, _Client.Password).Data);
 }
 /// <summary>
 /// Gets the application load data.
 /// </summary>
 /// <returns>The application load data.</returns>
 public NTMobileAppLoadData GetAppLoadData()
 {
     return(CntRestHelper.Request <NTMobileAppLoadData>(Constants.NTMOBILE_BASEURL + "/application-load", _Client.UserName, _Client.Password).Data);
 }
Esempio n. 8
0
 /// <summary>
 /// Gets a timesheet.
 /// </summary>
 /// <param name="timesheetId">The timesheet identifier.</param>
 /// <returns>The timesheet.</returns>
 public Timesheet GetTimesheet(int timesheetId)
 {
     return(CntRestHelper.Request <Timesheet>(Constants.NTMOBILE_BASEURL + "/timesheet/" + timesheetId, _Client.UserName, _Client.Password).Data);
 }
Esempio n. 9
0
 /// <summary>
 /// Sends a password reminder email to the specified email address.
 /// </summary>
 /// <param name="email">The email address.</param>
 /// <returns><c>true</c> if a password reminder was sent to the specified email address, <c>false</c> otherwise.</returns>
 public void SendPasswordReminder(string email)
 {
     CntRestHelper.Request(Constants.NTMOBILE_BASEURL + "/password-lookup?e=" + email, Constants.NTMOBILE_APPLICATION_ID, Constants.NTMOBILE_APPLICATION_KEY);
 }
Esempio n. 10
0
 /// <summary>
 /// Gets all offices for the current user.
 /// </summary>
 /// <returns>All offices for the current user.</returns>
 public IEnumerable <Office> GetOffices()
 {
     return(CntRestHelper.Request <IEnumerable <Office> >(Constants.NTMOBILE_BASEURL + "/offices", _Client.UserName, _Client.Password).Data);
 }
Esempio n. 11
0
 /// <summary>
 /// Authenticates the user with the API and registers the specified device identifier (if it is not already registered) to receive push notifications from CNT
 /// </summary>
 /// <param name="deviceId">The device identifier.</param>
 /// <returns>The user's application load data.</returns>
 public NTMobileAppLoadData Authenticate(string deviceId, string deviceType)
 {
     return(CntRestHelper.Request <NTMobileAppLoadData>(Constants.NTMOBILE_BASEURL + "/authenticate?d=" + deviceId + "&t=" + deviceType, _Client.UserName, _Client.Password).Data);
 }
Esempio n. 12
0
 /// <summary>
 /// Gets a notification.
 /// </summary>
 /// <param name="notificationId">The notification identifier.</param>
 /// <returns>The notification.</returns>
 public Notification GetNotification(int notificationId)
 {
     return(CntRestHelper.Request <Notification>(Constants.NTMOBILE_BASEURL + "/notification/" + notificationId, _Client.UserName, _Client.Password).Data);
 }
Esempio n. 13
0
 /// <summary>
 /// Gets a filtered list of notifications for the current user.
 /// </summary>
 /// <param name="query">The query used to filter.</param>
 /// <returns>A filtered list of all notifications for the current user.</returns>
 public IEnumerable <Notification> GetNotifications(string query)
 {
     return(CntRestHelper.Request <IEnumerable <Notification> >(Constants.NTMOBILE_BASEURL + "/notifications?q=" + query, _Client.UserName, _Client.Password).Data);
 }
Esempio n. 14
0
 /// <summary>
 /// Gets an availability block.
 /// </summary>
 /// <param name="blockId">The block identifier.</param>
 /// <returns>AvailabilityBlock.</returns>
 public AvailabilityBlock GetAvailabilityBlock(int blockId)
 {
     return(CntRestHelper.Request <AvailabilityBlock>(Constants.NTMOBILE_BASEURL + "/availability-block/" + blockId, _Client.UserName, _Client.Password).Data);
 }
Esempio n. 15
0
 /// <summary>
 /// Gets a filtered list of all placements for the current user.
 /// </summary>
 /// <param name="query">The query used to filter.</param>
 /// <returns>A filtered list of all placements for the current user.</returns>
 public IEnumerable <Placement> GetPlacements(string query)
 {
     return(CntRestHelper.Request <IEnumerable <Placement> >(Constants.NTMOBILE_BASEURL + "/placements?q=" + query, _Client.UserName, _Client.Password).Data);
 }
Esempio n. 16
0
 /// <summary>
 /// Gets a list of all mobile carriers.
 /// </summary>
 /// <returns>A list of all mobile carriers.</returns>
 public IEnumerable <string> GetMobileCarriers()
 {
     return(CntRestHelper.Request <IEnumerable <string> >(Constants.NTMOBILE_BASEURL + "/mobile-carriers", _Client.UserName, _Client.Password).Data);
 }
Esempio n. 17
0
 /// <summary>
 /// Gets all timesheets for the current user.
 /// </summary>
 /// <returns>All timesheets for the current user.</returns>
 public IEnumerable <Timesheet> GetTimesheets()
 {
     return(CntRestHelper.Request <IEnumerable <Timesheet> >(Constants.NTMOBILE_BASEURL + "/timesheets", _Client.UserName, _Client.Password).Data);
 }