public SaveProfileResponse SaveProfile(SaveProfileRequest saveProfileRequest) { var agent = AuthIntegration.GetAgent(); var saveProfileResponse = _agentConnect.SaveProfile(agent, saveProfileRequest); ClearAgentProfileCache(agent); return(saveProfileResponse); }
public IHttpActionResult SaveProfile([FromBody] SaveProfileRequest saveProfileRequest) { saveProfileRequest.ThrowIfNull(nameof(saveProfileRequest)); var response = _profileBusiness.SaveProfile(saveProfileRequest); return(Ok(response)); }
public static void SaveProfileProgress(string backendUrl, string session, ExitStatus exitStatus, Profile profileData, bool isPlayerScav) { SaveProfileRequest request = new SaveProfileRequest { exit = exitStatus.ToString().ToLower(), profile = profileData, isPlayerScav = isPlayerScav }; new Request(session, backendUrl).PutJson("/raid/profile/save", request.ToJson()); }
public AcApiResponse <SaveProfileResponse, ApiData> SaveProfile(SaveProfileRequest req) { var resp = _agentConnectIntegration.SaveProfile(req); var apiResp = new AcApiResponse <SaveProfileResponse, ApiData> { BusinessMetadata = MapperHelper.SetResponseProperties(resp.Payload?.Flags, DataSource.AgentConnect), ResponseData = resp }; return(apiResp); }
public static void SaveProfileProgress(string backendUrl, string session, ExitStatus exitStatus, Profile profileData, PlayerHealth currentHealth, bool isPlayerScav) { SaveProfileRequest request = new SaveProfileRequest { exit = exitStatus.ToString().ToLower(), profile = profileData, health = currentHealth, isPlayerScav = isPlayerScav }; // ToJson() uses an internal converter which prevents loops and do other internal things new Request(session, backendUrl).PutJson("/raid/profile/save", request.ToJson()); }
public async Task <IActionResult> Save(SaveProfileRequest contract, CancellationToken cancellationToken) { if (!ModelState.IsValid) { return(BadRequest(new ResponseMessage { Message = "One or more validation errors occurred." })); } var result = await _service.UpdateProfile(_mapper.Map <ProfileDTO>(contract), cancellationToken); if (!result) { return(BadRequest(new ResponseMessage { Message = "Profile has not been saved." })); } return(Ok(new ResponseMessage { Message = "Profile saved." })); }
public virtual async Task <SaveProfileResponse> SaveProfileAsync(Agent agent, SaveProfileRequest saveProfileRequest) { return(await AgentConnect.SaveProfileAsync(agent, saveProfileRequest)); }
public virtual SaveProfileResponse SaveProfile(Agent agent, SaveProfileRequest saveProfileRequest) { return(AgentConnect.SaveProfile(agent, saveProfileRequest)); }
/// <summary> /// Saves a profile to a file. It will create a .kameleo file to the required /// location. It will store all the profile settings, browsing data, cookies, /// history, bookmarks, installed extension / addons. Later it can be reloaded. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='guid'> /// The unique identifier of the profile /// </param> /// <param name='body'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ProfileResponse> SaveProfileAsync(this IKameleoLocalApiClient operations, System.Guid guid, SaveProfileRequest body = default(SaveProfileRequest), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.SaveProfileWithHttpMessagesAsync(guid, body, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Saves a profile to a file. It will create a .kameleo file to the required /// location. It will store all the profile settings, browsing data, cookies, /// history, bookmarks, installed extension / addons. Later it can be reloaded. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='guid'> /// The unique identifier of the profile /// </param> /// <param name='body'> /// </param> public static ProfileResponse SaveProfile(this IKameleoLocalApiClient operations, System.Guid guid, SaveProfileRequest body = default(SaveProfileRequest)) { return(operations.SaveProfileAsync(guid, body).GetAwaiter().GetResult()); }
public bool SaveProfile(SaveProfileRequest request) { string authenticationToken = FetchAuthenticationTokenFromRequest(); return SaveUserProfile(authenticationToken, request.FirstName, request.MiddleName, request.LastName, request.City); }