/// <summary> /// Delete a relationship from the current user by the relation's user id. /// </summary> /// <param name="userId">The user id.</param> /// <param name="relationshipType">The relationship type.</param> /// <returns>The <see cref="Task"/>.</returns> public async Task DeleteById(long userId, RelationshipType relationshipType) { var query = new RelationshipQuery(null, relationshipType); var url = this.GetFinalUrl(string.Format("{0}/{1}.json", Endpoints.Relationships, userId), query.SerializeQueryString()); await this.Client.DeleteAsync(url); }
/// <summary> /// Get other user's relationship by their id. /// </summary> /// <param name="userId">The user id.</param> /// <returns>The <see cref="RelationshipEnvelope"/>.</returns> public async Task<RelationshipEnvelope> GetById(long userId) { var query = new RelationshipQuery(userId, null); var url = this.GetFinalUrl(string.Format("{0}.json", Endpoints.Relationships), query.SerializeQueryString()); var result = await this.Client.GetAsync<RelationshipEnvelope>(url); return result.Content; }
/// <summary> /// Get other user's relationship by their id. /// </summary> /// <param name="userId">The user id.</param> /// <returns>The <see cref="RelationshipEnvelope"/>.</returns> public async Task <RelationshipEnvelope> GetById(long userId) { var query = new RelationshipQuery(userId, null); var url = this.GetFinalUrl(string.Format("{0}.json", Endpoints.Relationships), query.SerializeQueryString()); var result = await this.Client.GetAsync <RelationshipEnvelope>(url); return(result.Content); }
/// <summary> /// Delete a relationship from the current user by the relation's user id. /// </summary> /// <param name="userId">The user id.</param> /// <param name="relationshipType">The relationship type.</param> /// <returns>The <see cref="Task"/>.</returns> public async Task DeleteById(long userId, RelationshipType relationshipType) { var query = new RelationshipQuery(null, relationshipType); var url = this.GetFinalUrl(string.Format("{0}/{1}.json", Endpoints.Relationships, userId), query.SerializeQueryString()); await this.Client.DeleteAsync(url); }