/// <summary>
        /// This endpoint will return a list of candidates linked to your account in order of creation date. A maximum of 50 can be returned at a time, 20 are returned by default.
        /// </summary>
        /// <param name="email">Filter the candidates using a full or partial email address</param>
        /// <param name="offset">The number of items to skip before starting to collect the result set</param>
        /// <param name="limit">The numbers of items to return. Up to 50 items can be returned at a time, 25 are returned by default</param>
        /// <returns></returns>
        public GetCandidatesResponse ListCandidates(string email = null, long?offset = null, long?limit = null)
        {
            var url = $"candidates?";

            if (!string.IsNullOrEmpty(email))
            {
                url += $"email={email}&";
            }

            if (offset != null)
            {
                url += $"offset={offset}&";
            }

            if (limit != null)
            {
                url += $"limit={limit}&";
            }

            var json   = HttpHelpers.HttpGet(url);
            var retVal = new GetCandidatesResponse();

            retVal.Data = JsonConvert.DeserializeObject <GetCandidatesResponseData[]>(json);
            return(retVal);
        }
        /// <summary>
        /// This API endpoint will return a json object containing a single candidate, based on the num provided in the API call.
        /// </summary>
        /// <param name="num">Numeric ID of the candidate to retrieve</param>
        /// <returns></returns>
        public GetCandidatesResponseData RetrieveCandidate(long num)
        {
            var url    = $"candidate/{num}";
            var json   = HttpHelpers.HttpGet(url);
            var retVal = JsonConvert.DeserializeObject <GetCandidatesResponseData>(json);

            return(retVal);
        }
Example #3
0
        /// <summary>
        /// This API endpoint will return a json object containing a single candidate, based on the ID provided in the API call.
        /// </summary>
        /// <param name="num">Numeric ID of the referee to retrieve</param>
        /// <returns></returns>
        public GetRefereesResponse RetrieveSingleReferee(long num)
        {
            var url    = $"referee/{num}";
            var json   = HttpHelpers.HttpGet(url);
            var retVal = JsonConvert.DeserializeObject <GetRefereesResponse>(json);

            return(retVal);
        }
        /// <summary>
        /// Returns the details of of the user who is currently connected to the API
        /// </summary>
        /// <returns></returns>
        public GetAccountsResponseData GetMyAccount()
        {
            var url    = "me";
            var json   = HttpHelpers.HttpGet(url);
            var retVal = JsonConvert.DeserializeObject <GetAccountsResponseData>(json);

            return(retVal);
        }
        /// <summary>
        /// This API endpoint will return a json object containing a single account based on the ID provided in the API call
        /// </summary>
        /// <param name="num">Numeric ID of the account to retrieve</param>
        /// <returns></returns>
        public GetAccountsResponse RetrieveSingleChildAccount(long num)
        {
            var url    = $"account/{num}";
            var json   = HttpHelpers.HttpGet(url);
            var retVal = JsonConvert.DeserializeObject <GetAccountsResponse>(json);

            return(retVal);
        }
Example #6
0
        public GetBrandsResponse GetBrands()
        {
            var url    = "brands";
            var json   = HttpHelpers.HttpGet(url);
            var retVal = JsonConvert.DeserializeObject <GetBrandsResponse>(json);

            return(retVal);
        }
        /// <summary>
        /// This API endpoint will return a json object containing all of the referees a candidate has based on the record num provided in the API call.
        /// </summary>
        /// <param name="num">Numeric ID of the candidates referee's to retrieve</param>
        /// <returns></returns>
        public GetRefereesResponse RetrieveCandidatesReferees(long num)
        {
            var url    = $"candidate/{num}/referees";
            var json   = HttpHelpers.HttpGet(url);
            var retVal = new GetRefereesResponse();

            retVal.Data = JsonConvert.DeserializeObject <GetRefereesResponseData[]>(json);
            return(retVal);
        }
        /// <summary>
        /// This endpoint will return an array of questionnaires linked to this account in order of creation date. Only public or published questionaires will be returned. Draft items are not accessible.
        /// </summary>
        /// <param name="offset">The number of items to skip before starting to collect the result set</param>
        /// <param name="limit">The numbers of items to return. Up to 50 items can be returned at a time</param>
        /// <returns></returns>
        public List <GetQuestionnairesResponse> ListQuestionnaires(long offset = 0, long limit = 50)
        {
            var url = $"questionnaires?";

            url = HttpHelpers.OffSetsandLimits(url, offset, limit);

            var json   = HttpHelpers.HttpGet(url);
            var retVal = JsonConvert.DeserializeObject <List <GetQuestionnairesResponse> >(json);

            return(retVal);
        }
Example #9
0
        /// <summary>
        /// This endpoint will return a list of referee's linked to your account in order of creation date.
        /// </summary>
        /// <param name="offset">The number of items to skip before starting to collect the result set</param>
        /// <param name="limit">The numbers of items to return. Up to 50 items can be returned at a time.</param>
        /// <returns></returns>
        public GetRefereesResponse ListReferees(long offset = 0, long limit = 50)
        {
            var url = $"referees?";

            url = HttpHelpers.OffSetsandLimits(url, offset, limit);

            var json   = HttpHelpers.HttpGet(url);
            var retVal = JsonConvert.DeserializeObject <GetRefereesResponse>(json);

            return(retVal);
        }