Git Product home page Git Product logo

Comments (3)

markl181 avatar markl181 commented on July 19, 2024

can you provide the code you're using?

from tumblr.php.

KhanMaytok avatar KhanMaytok commented on July 19, 2024

I'm using the api console provided in the Tumblr API page. I use

// Authenticate via API Key
$client = new Tumblr\API\Client('myhypersecretapi');

// Make the request
$client->getBlogPosts('khanmaytok.tumblr.com', array('type' => 'text', 'tag' => 'galaxy'));

I get

{
  "meta": {
    "status": 200,
    "msg": "OK"
  },
  "response": {
    "blog": {
      "title": "Maytok Blog",
      "name": "khanmaytok",
      "total_posts": 3,
      "posts": 3,
      "url": "http://khanmaytok.tumblr.com/",
      "updated": 1461278736,
      "description": "",
      "is_nsfw": false,
      "ask": false,
      "ask_page_title": "Ask me anything",
      "ask_anon": false,
      "share_likes": true,
      "likes": 6
    },
    "posts": [],
    "total_posts": 1
  }
}

The posts array is empty, but total_post is 1

Then, I erase the type parameter...

// Make the request
$client->getBlogPosts('khanmaytok.tumblr.com', array('tag' => 'galaxy'));

I get

{
  "meta": {
    "status": 200,
    "msg": "OK"
  },
  "response": {
    "blog": {
      "title": "Maytok Blog",
      "name": "khanmaytok",
      "total_posts": 3,
      "posts": 3,
      "url": "http://khanmaytok.tumblr.com/",
      "updated": 1461278736,
      "description": "",
      "is_nsfw": false,
      "ask": false,
      "ask_page_title": "Ask me anything",
      "ask_anon": false,
      "share_likes": true,
      "likes": 6
    },
    "posts": [
      {
        "blog_name": "khanmaytok",
        "id": 143186171980,
        "post_url": "http://khanmaytok.tumblr.com/post/143186171980/caliente",
        "slug": "caliente",
        "type": "text",
        "date": "2016-04-21 22:45:36 GMT",
        "timestamp": 1461278736,
        "state": "published",
        "format": "html",
        "reblog_key": "F9pYN1KX",
        "tags": [
          "maytok",
          "test",
          "galaxy"
        ],
        "short_url": "https://tmblr.co/ZFfKdh25MZvXC",
        "summary": "Caliente",
        "recommended_source": null,
        "recommended_color": null,
        "highlighted": [],
        "note_count": 0,
        "title": "Caliente",
        "body": "<p>Algo está naciendo justo ahora.</p>\n<p data-height=\"400\" data-theme-id=\"light\" data-slug-hash=\"dMevgO\" data-default-tab=\"result\" data-user=\"SakyaStelios\" data-embed-version=\"2\" class=\"codepen\">See the Pen <a href=\"http://codepen.io/SakyaStelios/pen/dMevgO/\">Galaxy</a> by Giancarlo Ventura (<a href=\"http://codepen.io/SakyaStelios\">@SakyaStelios</a>) on <a href=\"http://codepen.io\">CodePen</a>.</p>\n<script async=\"\" src=\"//assets.codepen.io/assets/embed/ei.js\"></script>",
        "reblog": {
          "tree_html": "",
          "comment": "<p><p>Algo está naciendo justo ahora.</p>\n<p data-height=\"400\" data-theme-id=\"light\" data-slug-hash=\"dMevgO\" data-default-tab=\"result\" data-user=\"SakyaStelios\" data-embed-version=\"2\" class=\"codepen\">See the Pen <a href=\"http://codepen.io/SakyaStelios/pen/dMevgO/\">Galaxy</a> by Giancarlo Ventura (<a href=\"http://codepen.io/SakyaStelios\">@SakyaStelios</a>) on <a href=\"http://codepen.io\">CodePen</a>.</p>\n<script async=\"\" src=\"//assets.codepen.io/assets/embed/ei.js\"></script></p>"
        },
        "trail": [
          {
            "blog": {
              "name": "khanmaytok",
              "active": true,
              "theme": {
                "header_full_width": 1080,
                "header_full_height": 720,
                "header_focus_width": 1080,
                "header_focus_height": 607,
                "avatar_shape": "circle",
                "background_color": "#FAFAFA",
                "body_font": "Helvetica Neue",
                "header_bounds": "56,1080,663,0",
                "header_image": "https://secure.static.tumblr.com/e2113e04cd331da27440a47a1d9201e3/dbvrzi8/ZwIo47drg/tumblr_static_b6jsisu9n6og4gcgwg4sgokcg.jpg",
                "header_image_focused": "https://secure.static.tumblr.com/e2113e04cd331da27440a47a1d9201e3/dbvrzi8/gK5o47dri/tumblr_static_tumblr_static_b6jsisu9n6og4gcgwg4sgokcg_focused_v3.jpg",
                "header_image_scaled": "https://secure.static.tumblr.com/e2113e04cd331da27440a47a1d9201e3/dbvrzi8/ZwIo47drg/tumblr_static_b6jsisu9n6og4gcgwg4sgokcg_2048_v2.jpg",
                "header_stretch": true,
                "link_color": "#529ECC",
                "show_avatar": true,
                "show_description": true,
                "show_header_image": true,
                "show_title": true,
                "title_color": "#444444",
                "title_font": "Gibson",
                "title_font_weight": "bold"
              },
              "share_likes": true,
              "share_following": true
            },
            "post": {
              "id": "143186171980"
            },
            "content_raw": "<p><p>Algo está naciendo justo ahora.</p>\n<p data-height=\"400\" data-theme-id=\"light\" data-slug-hash=\"dMevgO\" data-default-tab=\"result\" data-user=\"SakyaStelios\" data-embed-version=\"2\" class=\"codepen\">See the Pen <a href=\"http://codepen.io/SakyaStelios/pen/dMevgO/\">Galaxy</a> by Giancarlo Ventura (<a href=\"http://codepen.io/SakyaStelios\">@SakyaStelios</a>) on <a href=\"http://codepen.io\">CodePen</a>.</p>\n<script async=\"\" src=\"//assets.codepen.io/assets/embed/ei.js\"></script></p>",
            "content": "<p>Algo está naciendo justo ahora.</p>\n<p>See the Pen <a href=\"http://codepen.io/SakyaStelios/pen/dMevgO/\">Galaxy</a> by Giancarlo Ventura (<a href=\"http://codepen.io/SakyaStelios\">@SakyaStelios</a>) on <a href=\"http://codepen.io\">CodePen</a>.</p>\n<p><a href=\"#\"><img src=\"https://secure.assets.tumblr.com/images/inline_placeholder.png\" width=\"18\" height=\"14\"/></a></p>",
            "is_current_item": true,
            "is_root_item": true
          }
        ]
      }
    ],
    "total_posts": 1
  }
}

from tumblr.php.

ceyko avatar ceyko commented on July 19, 2024

@KhanMaytok I've checked into this a bit and it is indeed an issue on the backend, specifically when requesting text posts along with filtering by tag. I've filed a bug internally and should have a fix shortly.

Good catch, thanks!

from tumblr.php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.