Closed jorjo1 closed 8 years ago
@jorjo1 Hi, there is already a field for PLODs in every character. app/models/character.js
At the moment, these values are null
for every character and therefore won't be displayed. PLOD needs to be inserted
Thanks for the explanation. :+1:
Wait, wait, wait.. @togiberlin you are aware that PLOD's are two, right? https://github.com/Rostlab/JS16_ProjectA/blob/63a9d48ba0a03767fa3991cee1aa0fdf2370eee8/app/models/character.js#L18
To me it makes much more sense if you implement it the way you implemented sentiments. Separate calls, separate collections: https://github.com/Rostlab/JS16_ProjectA/blob/63a9d48ba0a03767fa3991cee1aa0fdf2370eee8/app/models/characterSentiment.js
@sacdallago Ok, and inside the characterPLOD model you do want two separate fields, right? plod1: Number
and plod2: Number
Let's start of with I am inferring logic: You can simply store two entries for the same character, similarly as I THINK the idea is behind the twitter sentiment: https://github.com/Rostlab/JS16_ProjectA/blob/63a9d48ba0a03767fa3991cee1aa0fdf2370eee8/app/models/characterSentiment.js
Based on the number of X results, F / @jorjo1 can render X tabs showing the different entries.
Correct me if this doesn't make sense. Also, @togiberlin can you please confirm that's how your team-members have thought of implementing the sentiment thing? Otherwise we have a problem there as well, as only one team is represented per document.
P.S.: this would allow in the future to simply add entries in the database and have the webpage immediately render the third-machine learning device calculation: :heavy_check_mark: modularity, :heavy_check_mark: reusability
@sacdallago, yes you can store two values for a character, however how we want to differentiate between Project B, Group 6 / Group 7? I was thinking of this:
var CharacterPlodSchema = new Schema({
character : {type: Schema.Types.ObjectId, ref: 'Character'},
plod1: Number, //% likelihood of death. Project B, Group 6
plod2: Number //% likelihood of death. Project B, Group 7
});
You did not quite understand what I told you :D @Adiolis @kordianbruck can you help me out here please? How is the Twitter thing implemented? (read my previous comments)
and for @togiberlin : What if tomorrow there is a new machine learning device that calculates a new PLOD? You'd have to completely redesign the schema. A much easier solution is:
var CharacterPlodSchema = new Schema({
character : {type: Schema.Types.ObjectId, ref: 'Character'},
plod: Number, //% likelihood of death.
description: String //% Whatever. B7, B6, Method XYZ
});
Ok. I saw the commits, I like where this is going! I think that this is now settled, can we close?
@sacdallago What I have to add are the API routes/controllers to add/edit the PLOD values. It should be done with the next couple hours
@togiberlin please remove status
as it is redundant information, that is already saved in the character itself, if he/she is alive. Also description
would be better named algorithm
@kordian did this. The PLOD thing has it's own controller/store file and API routes now.
@togiberlin I think you got the wrong Kordian :)
@KORDiAN it's me <3
@togiberlin thanks! Why did you add routes for character edit/delete?
@kordianbruck I like the description
more because they might be using the same ML device!
@sacdallago it might be the same device but different configuration of the algorithm (used features) - so I think is makes it clearer...
Our first couple fight, ohw :heart:
Let's compromise, cause thats what you do in a relationship: descrithm k? :+1:
Status?
I just assigned togi, because he has been doing this stuff. I have no clue about this at all.
Again, status? Milestone is feature freeze...
@adiolis All GET methods should work. However, I couldn't figure out this access token thing, which is needed for adding/editing/removing data via API. I don't know if it's a bug or something. I asked @kordianbruck over fb for assistance. I think he knows better than me, how this access token works
So only the testing is here left?
token works now. Was an issue with multi threaded setup....
I am a bit confused now, so getting a character by id or name has a PLOD inside it ? or i have to make a unique request for the character PLOD (i.e. https://api.got.show/api/plod/byId/:id ) ?
The PLOD is not in the character, you need a separate call like the one you put there. That was the design. If no one corrects me, then you have your answer.
Ok any idea how the returned object looks like ?
Excuse my ignorance, but does the reference to the character model mean that all the character model attributes will be embedded also inside it? and if not i need at least an id or name
You have the same ability to navigate files as everyone else :laughing: https://github.com/Rostlab/JS16_ProjectA/blob/master/routes.js#L50
@sacdallago Well its not normal to understand the code and navigate other project to understand how is the response looking like, the api doesnt return a sample object i can check or the documentation specifies how it should look like, and i have no idea which technology they are using or framework !!
Yes but all of the questions you are asking have already been asked, discussed and answered in this discussion if you scroll long enough and look at the commits ;) I am sorry but I get very irritable when I have to repeat things, it's one of those things I ought to become better at :laughing:
no worries, But i still cant see an answer on how the response is going to look like. and excuse my ignorance one more time i am not aware of the technology they are using and what it means that the character model is referenced inside the characterPlod model. does that mean all the character attributes be embedded in the response or will be ingored
It depends on which of the GET calls you call. If you GET by alg I suppose you get the schema obj as the one I posted above for all chars with that alg. Yes. The _id
of the char will be in the obj, not the entire obj. So you have to join the chars with the respective PLOD. That's usually how these things work, but maybe @togiberlin implemented it differently.
Instead if you GET the PLOD of a character via _id
you should get TWO objects, one is one PLOD and the otherone is the other PLOD, as in group 6 'nd 7.
Hello, for the representation of the character profile and ranking page we need exact value of the PLOD for each character. Could you fellows please implement this soon?
https://got-api.bruck.me/doc/#api-Characters-GetById
e.g. https://got-api.bruck.me/api/characters/byId/56ea4cfe8c27d7c637505844