o.js icon indicating copy to clipboard operation
o.js copied to clipboard

Documentation

Open GhostMayor opened this issue 5 years ago • 7 comments

where can I get detailed documentation on methods ?

GhostMayor avatar Sep 19 '19 09:09 GhostMayor

Each public method has a JSDoc annotation. We don't have any more documentation atm. What do you need?

janhommes avatar Sep 24 '19 11:09 janhommes

Also looking for documentation. Specifically the syntax for deleting relations (links) between entities.

kevinchiu avatar Sep 24 '19 13:09 kevinchiu

so for that you best look at the odata spec: http://docs.oasis-open.org/odata/odata/v4.01/csprd05/part2-url-conventions/odata-v4.01-csprd05-part2-url-conventions.html#sec_AddressingReferencesbetweenEntities

Basically (without ever have tested it) you just need to add a $ref. You can request them like this: o('http://my-odata.service.org').get('Categories(0)/Products/$ref').query()

I guess you can use post, put and delete here as well, to remove or add them. The details of this should be in the spec.

janhommes avatar Sep 24 '19 14:09 janhommes

if the index.d.ts file were used in the root directory and the entire project was done through it and is also specified in types (typings), as the TypeScript documentation says, it would be much easier to use your module for development image

GhostMayor avatar Sep 24 '19 19:09 GhostMayor

Agree, needs to be fixed. There are no typings attached :man_facepalming:

janhommes avatar Sep 25 '19 08:09 janhommes

Can you check the latest 1.0.3 release if the typings are now correct?

janhommes avatar Sep 25 '19 20:09 janhommes

Yes, I looked at the documentation that was generated, but I found a couple of comments.

in OHandler.d.ts Look in line where use get method you write in correct, having forgotten "')" and I also think that if you insert this example it will not work since " ' " will not be escaped, you need to use ' " ' to insert the text image

OdataConfig return "void" , but in defaultConfigValues returned "null" image image

And

GhostMayor avatar Sep 29 '19 22:09 GhostMayor