• Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Darkly)
  • No Skin
Collapse
brainCloud Forums
A

Alexandru

@Alexandru
About
Posts
3
Topics
2
Groups
0
Followers
0
Following
0

Topics

  • A

    Segmentation APIs

    Scheduled Pinned Locked Moved Cloud Code cloudscript segmentation
    4
    0 Votes
    4 Posts
    566 Views
    Paul WinterhalderP

    Hi @Alexandru ,

    We've just officially added the Segment call you're looking for to brainCloud 4.55 - which is targeted for release in the next ~30 days...

    Updated Roadmap here - https://portal.productboard.com/braincloud/1-braincloud-baas-roadmap

    Paul.

  • A

    Method to access "other user" items

    Scheduled Pinned Locked Moved Solved General items users
    2
    1 Votes
    2 Posts
    335 Views
    Paul WinterhalderP

    Hi Claudiu,

    It's possible to do this using cloud script... you just need to impersonate the other user...

    Here's an example script that does this - caveat, it only returns the first page of user items.

    Create the script, and set it's test parameters to:

    { "profileId": "www-xxx-yyy-zzzz-123456" }

    (Note - you'll of course want to replace profileId with an id of a user that you want to test with.)

    And here's the code...

    var response = {}; // We need to impersonate another user to make this call var otherSession = bridge.getSessionForProfile( data.profileId ); var otherUserItemsProxy = bridge.getUserItemsServiceProxy( otherSession ); // Now, request the page of items from that proxy var context = { "pagination": { "rowsPerPage": 50, "pageNumber": 1 }, "searchCriteria": {}, "sortCriteria": { "createdAt": 1 } }; var includeDef = true; var itemResult = otherUserItemsProxy.getUserItemsPage( context, includeDef ); if (( itemResult.status == 200) && ( itemResult.data.results.count > 0 )) { response.items = itemResult.data.results.items; } else { response.items = []; } response;

    For convenience I've attached an export of the script. You can import this script into your app from the Design | Cloud Code | Scripts screen.

    Hope that helps!

    Paul.

    RetrieveAnotherUsersItems.ccjs

  • Login

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users