Plugin Author
berkux
(@berkux)
the free version can check each entry on a special string (e. g. “f”) with oneofthesewordsmustbein. If this is in the output-item-string then show it, otherwise not.
As here “f” or “m” might occur in other data this won’t match as you like. So you have to define a outoutfield “Gender f” and check on that.
If you need a really reliabl way on checking the gender field directly you need the pro plugin.
Bernhard
Thread Starter
Anonymous User 16700017
(@anonymized-16700017)
How do I define an outputfield?
Plugin Author
berkux
(@berkux)
this should look like
[jsoncontentimporter url=https://de.chaturbate.com/affiliates/api/onlinerooms/?wm=MUIXl&format=json oneofthesewordsmustbein="gender f" oneofthesewordsmustbeindepth=2 urlgettimeout=120 DEdebugmode=10]
num_followers: {num_followers}, gender {gender}<br>
[/jsoncontentimporter]
This loops (if the API is not too slow as now) through all items.
Sometimes its “gender m”, sometimes “gender f”. This is checked by oneofthesewordsmustbein.
-
This reply was modified 7 years, 5 months ago by
berkux.
-
This reply was modified 7 years, 5 months ago by
berkux.
Thread Starter
Anonymous User 16700017
(@anonymized-16700017)
Beautiful! Works like a charm! Thank you!
One more question. Using numberofdisplayeditems does’t work correctly now. If I add:
numberofdisplayeditems=5 oneofthesewordsmustbein=”gender m” oneofthesewordsmustbeindepth=2
and only 2 out of the 1st 5 records are “gender m” then that’s all I get. It stops looping at 5, not at 5 results. Is there another way I can limit results printed?
-
This reply was modified 7 years, 5 months ago by
Anonymous User 16700017.
Thread Starter
Anonymous User 16700017
(@anonymized-16700017)
Or alternatively is there a way to paginate results?
Plugin Author
berkux
(@berkux)
this is a limitation of the free plugin, the prp plugin can paginate and has a besser way to select needed items:
api.json-content-importer.com/pagination-by-twig/?no=2
Plugin Author
berkux
(@berkux)
Pleaes help me how i can use where condition, eg if i want to record for specific id course_id=1234