3meters / proxibase

Patchr web service
1 stars 0 forks source link

Service api coverage #429

Closed Jaymassena closed 8 years ago

Jaymassena commented 8 years ago

This an issue to track the service endpoints actually being used by our clients so unused endpoints could be removed without impact. I'm using output of IDE search tools so apologies for the extra scruff.

Android

Posts
return post(String.format("find/%1$s/%2$s", collection, id), parameters, null, null, false)
return post("suggest", parameters, null, null, false);
return post(String.format("find/messages/%1$s", messageId), parameters, queryId, skip, true);
return post(String.format("find/patches/%1$s", patchId), parameters, queryId, skip, true);
return post(String.format("find/users/%1$s", userId), parameters, queryId, skip, true);
return post(String.format("find/patches/%1$s", patchId), parameters, queryId, skip, true);
return post("user/getNotifications", parameters, queryId, skip, true);
return post("patches/near", parameters, queryId, skip, true);
return post(String.format("find/users/%1$s", userId), parameters, queryId, skip, true);
return post("patches/interesting", parameters, queryId, skip, true);
return post(String.format("find/users/%1$s", userId), parameters, queryId, skip, true);
return postEntity("user/create", parameters);
return post("data/links", parameters, null, null, false);
return post(String.format("data/links/%1$s", linkId), parameters, null, null, false)
return post(String.format("data/links/%1$s", linkId), parameters, null, null, false);
return post("auth/signin", parameters, null, null, false)
return post("auth/ak", parameters, null, null, true)
return post("user/pw/change", parameters, null, null, false).doOnNext(response -> {
return post("user/pw/reqreset", parameters, null, null, false);
return post("user/pw/reset", parameters, null, null, false)
return post("do/registerInstall", parameters, null, null, false);
return post("do/updateProximity", parameters, null, null, false);

Gets
return get("auth/signout", parameters, false);
return get("find/users", parameters, false);

Deletes
return delete(String.format("data/links/%1$s", linkId), parameters, null, false);
return delete("data/links", parameters, null, false);
String path = String.format("user/%1$s?erase=true", entityId);
String path = String.format("data/%1$s/%2$s", collection, entityId);

iOS

Posts
performPOSTRequestFor("find/patches/\(entityId)", parameters: parameters, completion: completion)
performPOSTRequestFor("find/messages/\(messageId)", parameters: parameters, completion: completion)
performPOSTRequestFor("find/users/\(userId)", parameters: parameters, completion: completion)
performPOSTRequestFor("patches/near", parameters: parameters, completion: completion)
performPOSTRequestFor("user/getNotifications", parameters: parameters, completion: completion)
performPOSTRequestFor("patches/interesting", parameters: parameters, completion: completion)
performPOSTRequestFor("find/users/\(userId)", parameters: parameters, completion: completion)
performPOSTRequestFor("find/patches/\(patchId)", parameters: parameters, completion: completion)
performPOSTRequestFor("find/patches/\(patchId)", parameters: parameters, completion: completion)
performPOSTRequestFor("find/users/\(userId)", parameters: parameters, completion: completion)
performPOSTRequestFor("find/users/\(userId)", parameters: parameters, completion: completion)
performPOSTRequestFor("find/users/\(userId)", parameters: parameters, completion: completion)
performPOSTRequestFor("find/patches/\(patchId)", parameters: parameters, completion: completion)
performPOSTRequestFor("find/messages/\(messageId)", parameters: parameters, completion: completion)
performPOSTRequestFor("data/links", parameters: postParameters) {
performPOSTRequestFor("data/links/\(linkId)", parameters: parameters, completion: completion)
performPOSTRequestFor("data/links/\(linkId)", parameters: parameters, completion: completion)
performPOSTRequestFor("do/registerInstall", parameters: parameters, completion: completion)
performPOSTRequestFor("do/updateProximity", parameters: parameters, completion: completion)
let endpoint = self.inputEntity == nil ? "data/messages" : "data/messages/\(self.inputEntity!.id_!)"
let endpoint = self.inputState == State.Creating ? "data/patches" : "data/patches/\(self.inputPatch!.id_!)"
DataController.proxibase.postEntity("user/create", parameters: createParameters)
let endpoint = "data/users/\(self.inputUser!.id_)"

Get

performGETRequestFor("auth/signout", parameters: [:])

Delete

let linkPath = "data/links/\(linkID)"
let linkPath = "data/links?\(queryString)"
let entityPath = "data/messages/\((self.inputMessage?.id_)!)"
let entityPath = "data/patches/\((self.inputPatch?.id_)!)"
let entityPath = "user/\((self.inputUser!.id_)!)?erase=true"
Jaymassena commented 8 years ago

I have posted a new release of android patchr that uses the same rest api as the iOS client. I believe you can start cleaning out the unused endpoint, custom methods, associated tests, etc.

georgesnelling commented 8 years ago

Fixed with version 5.0.0 pushed to production.