Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

.versionEye() method #103

Closed
amihaiemil opened this issue May 25, 2017 · 5 comments
Closed

.versionEye() method #103

amihaiemil opened this issue May 25, 2017 · 5 comments

Comments

@amihaiemil
Copy link
Member

amihaiemil commented May 25, 2017

A Team, a Project, an Organization etc should be able to return the original VersionEye instance, for convenience of usage.
e.g.

Team team = //...fetch team
//...
VersionEye original = team.versionEye();

RtVersioneye should have a default-protected method to return the entry-point HTTP request.
This way, instead of passing the entry request around, we just pass the original RtVersionEye.

@amihaiemil
Copy link
Member Author

@SherifWaly want to do this? It shouldn't be so complicated :D

@SherifWaly
Copy link
Contributor

@amihaiemil Ok, I would like to do it :D
Just I want to ask whether I should only pass the VersionEye instance so what about the request as it's built over the way :D ?

@amihaiemil
Copy link
Member Author

@SherifWaly Right now, in the Organizations -> Teams -> Projects flow, 2 requests are passed: the one that is built along the way, and the original one (entry point, which is encapsulated by VersionEye). This is because, for instance, the Projects API starts the uri path from 0 again, instead of continuing it (it's not optimal, but it's how the API is designed).

Now, instead of passing 2 requests, we will pass 1 request (the one which is built along the way) and the VersionEye instance:

  • the VersionEye instance will be returned by the versionEye() methods
  • the VersionEye instance will have a default accessible method to fetch the original request. So a Project, when it needs the original request, will call this.versionEye.request()

Makes sense?

And since VersionEye.request() is package protected and cannot be on the interface, it will be on RtVersionEye only. All the ctors will accept RtVersionEye :D

Only do this change: replace that request with versionEye and write the RtVersionEye.request() method. Puzzle out the actual implementation of Organization.versionEye(), Team.versionEye() etc. It's already enough stuff.

If you have any other questions, ask away :)

@SherifWaly
Copy link
Contributor

@amihaiemil Ok, thanks for explaining :)

@amihaiemil
Copy link
Member Author

done, thanks :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants