• Resolved Imagedjenk

    (@djenk)


    We’re using your plugin to feed content to a client’s mobile app, but the developer says the following:

    “The links are working fine, but the items are not coming over as correct JSON, pretty close, but they do not have {} wrappers around the end result.”

    This is a bit outside of my pay grade so I don’t know exactly what they’re talking about or how to get that functionality using your plugin. Is that possible? Is the issue with the custom post type we’re trying to use?

    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Imageyikesitskevin

    (@yikesitskevin)

    Hi @djenk,

    Which items are you referring to? I have a feeling your developer is referring to structural components of the WP REST API. (i.e. this is a WordPress problem, not a problem of this plugin). We don’t make any structural changes to the way the WP REST API works – we simply add or rename fields within the existing structure.

    However, this is a free forum. Is there any chance your developer can make an account and chime in?

    Let me know.

    Cheers,
    KEvin.

    Thread Starter Imagedjenk

    (@djenk)

    In this case, “items” means the individual listings of both a directory plugin and events on the site. But that’s all I know/understand about what they’re saying, or maybe I’m not understanding at all.

    Plugin Contributor Imageyikesitskevin

    (@yikesitskevin)

    Can you have your developer send a sample of the bad JSON? I don’t understand what he’s missing.

    Thread Starter Imagedjenk

    (@djenk)

    From the app developer, JSON url included:

    “Looking at this feed, there are a couple things that stand out. As far as formatting, the root/parent item is an array, rather than a JSON object. More importantly, however, I think we are going to need more information within each object. For the events (https://visitbrainerd.com/wp-json/wp/v2/tribe_events), for example, we are going to need things like start and end times and dates, event descriptions, image links, and any other pertinent information about the event on each event item. I am not seeing too much of that information on the event feed. Could you please help clarify where we should be looking for these attributes?”

    Plugin Contributor Imageyikesitskevin

    (@yikesitskevin)

    The root/parent is an array of post objects. That is the how the WordPress REST API works.

    Are you using our plugin? Your developer is trying to add meta data to the events post JSON object. That’s what our plugin does. You can enable the individual meta fields that you need for e.g. start time, end time, dates, etc.

    Plugin Contributor Imageyikesitskevin

    (@yikesitskevin)

    Looking at the endpoint you linked, I am seeing all of the meta fields e.g. _EventStartDate, _EventEndDate, etc.

    Thread Starter Imagedjenk

    (@djenk)

    I sent the app developer a new url. Rather than use the one created by your plugin, I used one based on the event plugin documentation (The Events Calendar).

    https://visitbrainerd.com/wp-json/tribe/events/v1/events

    Maybe that plugin is coded in such a way that it doesn’t play well with your plugin? Not really sure.

    I appreciate your help and interest in this, as it’s all new to me. Thanks.

    Thread Starter Imagedjenk

    (@djenk)

    Yes, I also see event start date, etc, in the endpoint created by your plugin, so I’m not sure what the developer is talking about, really. Yes, definitely using your plugin.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘JSON wrapper objects?’ is closed to new replies.