Comments (9)
The jsonobject builder, the "storage", will be passed through all the mkclasses, just like an http request is passed in the real ones. And each class will add a json object or array in it, or read something from it.
from versioneye-api.
Well, you could do MkMe? :D open an isue for it and I'll assign it to you :)
from versioneye-api.
@amihaiemil please pay attention to this new issue.
from versioneye-api.
@amihaiemil Each of Users, Organizations, ... etc should be passed a MkServer
object which is built in the unit test for example. Is that right or I'm missing something :D ?
from versioneye-api.
@SherifWaly Good question. Well, normally, we should also have POST methods, but as you see the API doesn't have many of those... most of them are only for GETting information from the server, not sending.
So it's going to be either as you said, or I think we could add POSTs on the interfaces (even if they are not yet available in the actual API) and the real implementations will throw UnsupportedOperationException
:D Makes sense?
When testing, it would be something like this:
VersionEye versioneye = MkVersionEye();
versioneye.me().comments().post(...)//add the comment to the JSON structure
//..test code here
And if versioneye
above would happen to be a real RtVersionEye
then the post(...)
method would throw the exception since there is no real endpoint to call yet. (well actually, the post method for comments would be on a Project interface somehow but nevermind :) )
from versioneye-api.
@amihaiemil Yes, I think I understand your idea :D
Just I want to note that for example Teams consists of JsonArray not JsonObject so would that conflict with MkServer as storage()
returns only JsonObjectBuilder and no JsonArrayBuilder?
from versioneye-api.
@SherifWaly no, because the JsonObjectBuilder of MkServer will contain everything. It will be the parent of all sub-jsons (think of it as of a tree). So when you add a JsonArray of teams, it will be part of the big json object :D
from versioneye-api.
@amihaiemil Yes, I understand it now thank you for elaborating :D
Could you assign me a sub-task which is somehow easy so that I would understand it better by implementing :) ?
from versioneye-api.
The puzzle 13-64d6efce
has disappeared from the source code, that's why I closed this issue. //cc @amihaiemil
from versioneye-api.
Related Issues (20)
- RtRepositories.java:46-47: Refactor code to make the class... HOT 2
- Github.java:37-37: Complete Github API methods. HOT 2
- .versionEye() method HOT 5
- RtVersionEye.java:41-41: Implement versionEye() method for... HOT 2
- MkVersionEye.java:42-43: Continue implementing the mock API.... HOT 1
- Github.java:37-39: Complete Github API methods. When... HOT 10
- RtRepositories.java:46-48: Modify repository(repositoryKey)... HOT 5
- Throw UnsupportedOperationException for unimplemented methods HOT 1
- Security.java:40-42: Implement a way of fetching the... HOT 3
- VersionEye.java:37-37: Implement the Product/Products Search... HOT 4
- test HOT 1
- test HOT 1
- VulnerabilitiesPage.java:39-40: Unit test this class, similar to how... HOT 2
- Repository.java:35-36: Complete implementations and unit... HOT 6
- Github.java:38-40: Complete Github API methods and move... HOT 10
- RtGithub.java:46-46: Unit test this class. HOT 2
- RepositoriesPage.java:39-40: Write some unit tests for this class.... HOT 5
- Vulnerability.java:35-36: Implement and unit test the methods... HOT 2
- Add DELETE method for Project HOT 1
- Implement Project.update(File) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from versioneye-api.