Support » Plugin: JSON API » JSON API Times Out

  • we use JSON API and created some custom methods to fetch a custom feild. In actual use, the api times out with a 500 error more than it works. It’s really unusable. Any advice?

    one custom function is:

    public function get_category_posts() {
    global $json_api;
    $category = $json_api->introspector->get_current_category();
    if (!$category) {
    $json_api->error(“Not found.”);
    $posts = $json_api->introspector->get_posts(array(
    ‘cat’ => $category->id,
    ‘posts_per_page’ => 15
    return array(‘posts’ => self::format_posts($posts, $category->title));

    format posts fetches the custom field and an image for the post.

  • The topic ‘JSON API Times Out’ is closed to new replies.