Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Can anyone Explain How to use This project.. There is no proper documentation for this project.
Can anyone Explain How to use This project.. There is no proper documentation for this project.
Comments
Comment #2
larskhansen CreditAttribution: larskhansen as a volunteer commentedHi Sundhar,
This isn't really the place to answer support questions, but perhaps the maintainers will be inspired to write documentation ;-)
I've been playing with this module for a while now and I have the basic covered.
You don't write about your current status - where you are in implementing the external API.
I have an external test api, http://rest/book, that displays a list of books in JSON format:
[{"pid":1,"titel":"It"},{"pid":2,"titel":"It 2"},{"pid":3,"titel":"It 3"},{"pid":4,"titel":"It 4"},{"pid":5,"titel":"It 5"}]
http://rest/book/1 displays a single book in JSON format: (forfatter is author in danish)
{"pid":"1","titel":"It","year":1981,"forfatter":[1]}
In the Drupal External Entities I have the following setup:
Storage Client: REST
Format: json
Endpoint: http://rest/book
I then add the fields from the rest (external entities id = pid / title = title / (new D8 field called year) = year etc etc.)
That's it.
If your External Entity type reference to another EE (Ex: author) then you only need the ID. As I have in forfatter (author).
Best regards, Lars Hansen
Comment #3
lquessenberry CreditAttribution: lquessenberry for E.C. Barton & Co commentedThis seems overly complicated. A few examples would be doing everyone very well.
Comment #4
Sundhar Krishna CreditAttribution: Sundhar Krishna commentedThank you larskhansen.
Comment #5
Hanno CreditAttribution: Hanno commentedfixed, see #2650546