Code Monkey home page Code Monkey logo

Comments (8)

tbarbugli avatar tbarbugli commented on June 16, 2024 1

you have to specify the user_id when you read the feed (ie. different users can read the same feed)

make sure to pass user_id="alice" to feed.get

from stream-python.

ferhatelmas avatar ferhatelmas commented on June 16, 2024 1

@francescov1 could you create an issue for node sdk on its repo?

FYI, you can pass whatever you want into feed.get(options), only ts types might be missing.

from stream-python.

tbarbugli avatar tbarbugli commented on June 16, 2024

this will return recent reactions + own reactions can you include more information about the output you receive?

from stream-python.

fahim-15 avatar fahim-15 commented on June 16, 2024

feed = client.feed('timeline', 'alice');
response = feed.get(limit=30, enrich=True, reactions: {"counts": true, "recent": true, "own": true})

I requested for alice's timeline feeds with own reactions "True". But in "own reactions" got reactions from other users.

User alice didn't reacted to any activity. So "own activity" supposed to be empty.

Output of a activity:

'activities': [
  {
    'actor': '45',
    'user': {
      'created_at': '2019-02-05T07:21:19.656132Z',
      'updated_at': '2019-06-19T06:04:56.019912Z',
      'id': '45''data': {
        'first_name': 'Priya',
        'last_name': 'Jadhav',
        'user_id': 45
      }
    },
    'event_id': 134,
    'event_name': 'test event',
    'foreign_id': '769attending_eventtest',
    'id': '09960ddc-9343-11e9-8080-80004cee6f7e',
    'object': 'event:134',
    'origin': 'user:45',
    'own_reactions': {
      'comment': [
        {
          'id': 'e654f92e-95b6-4fdf-819e-ba4f23fad512',
          'user_id': '12',
          'user': {
            'data': {
              'first_name': 'Test1',
              'last_name': 'User1',
              'user_id': 12
            }
          },
          'kind': 'comment',
          'activity_id': '785ee75c-933e-11e9-8080-8001532dde99',
          'data': {
            'text': 'helllllllooooooo'
          },
          'parent': '',
          'latest_children': {
            
          },
          'children_counts': {
            
          }
        },
        {
          'id': '6b7972b6-914c-4d65-a747-74930dab978e',
          'user_id': '12',
          'user': {
            'data': {
              'first_name': 'Test1',
              'last_name': 'User1',
              'user_id': 12
            }
          },
          'kind': 'comment',
          'activity_id': '785ee75c-933e-11e9-8080-8001532dde99',
          'data': {
            'text': 'Good afternoon!'
          },
          'parent': '',
          'latest_children': {
            
          },
          'children_counts': {
            
          }
        }
      ],
      'like': [
        {
          'id': 'fe845142-53c7-4453-9889-98e4fef05b1f',
          'user_id': '89',
          'user': {
            'data': {
              'first_name': 'Test2',
              'last_name': 'User2',
              'user_id': 89
            }
          },
          'kind': 'like',
          'activity_id': '785ee75c-933e-11e9-8080-8001532dde99',
          'data': {
            
          },
          'parent': '',
          'latest_children': {
            
          },
          'children_counts': {
            
          }
        },
        {
          'id': '1ff567ba-c8b0-4c94-a106-ce881c8bacb1',
          'user_id': '12',
          'user': {
            'created_at': '2018-12-26T06:00:17.904858Z',
            'updated_at': '2019-06-19T14:20:06.779968Z',
            'id': '12',
            'data': {
              'first_name': 'Test1',
              'last_name': 'User1',
              'user_id': 12
            }
          },
          'kind': 'like',
          'activity_id': '785ee75c-933e-11e9-8080-8001532dde99',
          'data': {
            
          },
          'parent': '',
          'latest_children': {
            
          },
          'children_counts': {
            
          }
        }
      ]
    },
    'latest_reactions': {
      
    },
    'latest_reactions_extra': {
      
    },
    'reaction_counts': {
      'comment': 2,
      'like': 2
    },
    'target': '',
    'verb': 'event'
  }
],
'activity_count': 1,
'actor_count': 1,
'group': '09960ddc-9343-11e9-8080-80004cee6f7e',
'id': '0a77f2d5-9343-11e9-8080-80011a5332c2',
'verb': 'event'
}

from stream-python.

fahim-15 avatar fahim-15 commented on June 16, 2024

thank you @tbarbugli it worked!

from stream-python.

fahim-15 avatar fahim-15 commented on June 16, 2024

from stream-python.

francescov1 avatar francescov1 commented on June 16, 2024

Hi, we are running into this same issue using the Node.js SDK (not the ORM, just barebones) but there doesn't seem to be a user_id field we can pass to feed.get.

from stream-python.

MihaiNueleanu avatar MihaiNueleanu commented on June 16, 2024

@ferhatelmas - thank you! you saved me days of banging my head against the wall 👍

from stream-python.

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.