Koala v3.0.0 Release Notes

Release Date: 2017-03-17 // over 4 years ago
  • ⬆️ Most users should not see any difference upgrading from 2.x to 3.0. Most of the changes are internal to how requests go from a graph method (like get_connections) through the API to the ⬆️ HTTP layer and back. If you're not using API#api or HTTPService.make_request directly, upgrading should (in theory) require no code changes. (Let me know if you run into any issues.)

    Key breaking changes:

    • 💎 Koala now requires Ruby 2.1+ (or equivalent for JRuby, etc.)
    • API#api now returns a Koala::HTTPService::Response object; graph_call handles further processing
    • GraphBatchAPI no longer inherits from API (the interface is otherwise unchanged)
    • 📜 Empty response bodies in batch API calls will raise a JSON::ParserError rather than returning nil
    • HTTPService.make_request now requires an HTTPService::Request object (Koala.make_request does not)
    • HTTPService behavior should not change, but in edge cases might. (If so, please let me know.)
    • API#search now requires a "type"/:type argument, matching Facebook's behavior (improving their cryptic error message)

    🆕 New features:

    • 👀 Koala now supports global configuration for tokens, secrets, etc! See the readme.
    • GraphCollection now exposes #headers, allowing access to etag/rate limiting/etc. info (thanks, pawandubey and jessieay!) (#589)

    ⚡️ Updated features:

    • 🔧 Koala.config now uses a dedicated Koala::Configuration object
    • ✅ TestUser#befriend will provide the appsecret_proof if a secret is set (thanks, kwasimensah!)
    • API#search now requires an object type parameter to be included, matching Facebook's API (#575)
    • ⚡️ RealtimeUpdates will now only fetch the app access token if necessary, avoiding unnecessary calls

    ✂ Removed features:

    • ✂ Removed support for the Rest API, since Facebook removed support for it (#568)
    • ✂ Removed support for FQL, which Facebook removed on August 8, 2016 (#569)
    • ✂ Removed legacy duplication of serveral constants in the Koala module (#569)
    • Removed API#get_comments_for_urls, which pointed to a no-longer-extant endpoint(#570)

    Internal improvements:

    • Completely rewrote HTTPService.make_request and several others, extracting most logic into HTTPService::Request (#566)
    • API#api now returns a Koala::HTTPService::Response object (#584)
    • GraphBatchAPI no longer inherits from API (#580)
    • ♻️ GraphBatchAPI has been refactored to be simpler and more readable (thanks, acuppy!) (#551)
    • 📜 Use the more secure JSON.parse instead of JSON.load (thanks, lautis!) (#567)
    • 🚚 Use JSON's quirks_mode option to remove hacky JSON hack (#573 -- thanks sakuro for the suggestion!)
    • The gemspec now allows both JSON 1.8 and 2.0 (#596) (thanks, pawandubey!)
    • ✂ Remove Autotest and Guard references (no longer used/needed)

    ✅ Testing improvements:

    • 🛠 Fixed a bunch of failing mocked specs


    • ➕ Added an issue and pull request template
    • ⚡️ Updated Code of Conduct to 1.4

Previous changes from v2.5.0

  • 🆕 New features:

    • API#get_object_metadata provides a convenient accessor to an object's graph metadata (thanks, sancopanco!)

    📚 Documentation improvements:

    • ➕ Add explicit require to examples in readme.md (thanks, dwkns!)

    Internal improvements:

    • ✂ Remove MultiJson dependency (thanks, sakuro!)