Ejemplo n.º 1
0
        /// <summary>
        /// Update settings about a fleet
        /// </summary>
        /// <param name="authToken">Access token to use</param>
        /// <param name="fleetId">ID for a fleet</param>
        /// <param name="motd">New fleet MOTD in CCP flavoured HTML</param>
        /// <param name="isFreeMove">Should free-move be enabled in the fleet</param>
        /// <returns>IsSuccessful will be true on a successful call</returns>
        public ESIResponse <object> UpdateFleet(string authToken, Int64 fleetId, string motd, bool?isFreeMove)
        {
            var request = RestRequestHelper.CreateAuthorizedPutRequest($"fleets/{fleetId}/", authToken);

            request.AddJsonBody(new { motd, is_free_move = isFreeMove });

            return(_httpClient.Execute <object>(request));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Update metadata about a mail
        /// </summary>
        /// <param name="authToken">Access token to use</param>
        /// <param name="characterId">An EVE character ID</param>
        /// <param name="mailId">An EVE mail ID</param>
        /// <param name="read">Whether the mail is flagged as read</param>
        /// <param name="labels">Labels to assign to the mail. Pre-existing labels are unassigned</param>
        /// <returns>Mail updated</returns>
        public ESIResponse <object> UpdateMail(string authToken, int characterId, int mailId, bool?read, List <long> labels)
        {
            var request = RestRequestHelper.CreateAuthorizedPutRequest($"characters/{characterId}/mail/{mailId}/", authToken);

            request.AddJsonBody(new { read, labels });

            return(_httpClient.Execute <object>(request));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Rename a fleet wing
        /// </summary>
        /// <param name="authToken">Access token to use</param>
        /// <param name="fleetId">ID for a fleet</param>
        /// <param name="wingId">The wing to delete</param>
        /// <param name="name">New wing name</param>
        /// <returns>IsSuccessful will be true on a successful call</returns>
        public ESIResponse <object> RenameFleetWing(string authToken, Int64 fleetId, Int64 wingId, string name)
        {
            var request = RestRequestHelper.CreateAuthorizedPutRequest($"fleets/{fleetId}/wings/{wingId}/", authToken);

            request.AddJsonBody(new { name });

            return(_httpClient.Execute <object>(request));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Move a fleet member around
        /// </summary>
        /// <param name="authToken">Access token to use</param>
        /// <param name="fleetId">ID for a fleet</param>
        /// <param name="characterId">The character ID of a member in this fleet</param>
        /// <param name="role">
        /// If a character is moved to the fleet_commander role, neither wing_id or squad_id should be specified.
        /// If a character is moved to the wing_commander role, only wing_id should be specified.
        /// If a character is moved to the squad_commander role, both wing_id and squad_id should be specified.
        /// If a character is moved to the squad_member role, both wing_id and squad_id should be specified.
        /// </param>
        /// <param name="wingId"></param>
        /// <param name="squadId"></param>
        /// <returns>IsSuccessful will be true on a successful call</returns>
        public ESIResponse <object> MoveFleetMember(string authToken, Int64 fleetId, int characterId, string role, Int64?wingId, Int64?squadId)
        {
            var request = RestRequestHelper.CreateAuthorizedPutRequest($"fleets/{fleetId}/members/{characterId}/", authToken);

            request.AddJsonBody(new { role, wing_id = wingId, squad_id = squadId });

            return(_httpClient.Execute <object>(request));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Update the vulnerability window schedule of a corporation structure
        /// </summary>
        /// <param name="authToken">Access token to use</param>
        /// <param name="corporationId">An EVE corporation ID</param>
        /// <param name="structureId">A structure ID</param>
        /// <param name="newSchedule">New vulnerability window schedule for the structure</param>
        /// <returns>IsSuccessful will be true o a successful call.</returns>
        public ESIResponse <object> UpdateCorporationStructureVulnerabilitySchedule(string authToken,
                                                                                    int corporationId, Int64 structureId,
                                                                                    List <UpdateCorporationStructureVulnerabilityScheduleInput> newSchedule)
        {
            var request = RestRequestHelper.CreateAuthorizedPutRequest($"corporations/{corporationId}/structures/{structureId}/", authToken);

            request.AddBody(newSchedule);

            return(_client.Execute <object>(request));
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Bulk edit contacts with same settings
        /// </summary>
        /// <param name="authToken">Access token to use</param>
        /// <param name="characterId">An EVE character ID</param>
        /// <param name="contactIds">A list of contacts to add</param>
        /// <param name="standing">Standing for the new contact</param>
        /// <param name="labelId">Add a custom label to the new contact</param>
        /// <param name="watched">Whether the new contact should be watched, note this is only effective on characters</param>
        /// <returns>IsSuccessful will be true on successfull call</returns>
        public ESIResponse <object> UpdateContacts(string authToken, int characterId, Int64[] contactIds, float standing, int?labelId, bool?watched)
        {
            var request = RestRequestHelper.CreateAuthorizedPutRequest($"characters/{characterId}/contacts/", authToken);

            request.AddParameter("standing", standing, ParameterType.QueryString);
            request.AddParameter("label_id", labelId, ParameterType.QueryString);
            request.AddParameter("watched", watched, ParameterType.QueryString);
            request.AddBody(contactIds);

            return(_client.Execute <object>(request));
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Set your response status to an event
        /// </summary>
        /// <param name="authToken">Access token to use</param>
        /// <param name="characterId">An EVE character ID</param>
        /// <param name="eventId">The id of the event requested</param>
        /// <param name="response">The response value to set, overriding current value. Candidates are: [ accepted, declined, tentative ]</param>
        /// <returns>IsSuccessful will be true on successfull call.</returns>
        public ESIResponse <object> RespondEvent(string authToken, int characterId, Int64 eventId, string response)
        {
            var request = RestRequestHelper.CreateAuthorizedPutRequest($"characters/{characterId}/calendar/{eventId}/", authToken);

            return(_client.Execute <object>(request));
        }