chemokita13 / beReal-api

A not official BeReal rest API in wich you can get all posts info, comment, upload a post...
https://berealapi.fly.dev
70 stars 5 forks source link

search a username possible #15

Open witchfindertr opened 8 months ago

witchfindertr commented 8 months ago

search a username possible

chemokita13 commented 8 months ago

A username who hasn't been taked?

witchfindertr commented 8 months ago

A username who hasn't been taked?

no no no , search a username and get this username profile photo ,important for me

AaditT commented 8 months ago

@witchfindertr

The /friends/info endpoint should give you the necessary data.

The usernames of users can be found at response['data']['data']['data'][index]['username'] and the profile picture url of the users can be found at response['data']['data']['data'][index]['profilePicture']['url']

below is sample code to query for profile pictures given a user:

def getFriendProfilePicture(username):
  friends = response['data'].get('data', {}).get('data', [])
    for friend in friends:
      if friend.get('username') == username:
        friend_profile_picture = user_info.get('profilePicture')
        if friend_profile_picture:
          return profile_picture_info.get('url')
        else:
          return "Not found"
chemokita13 commented 8 months ago

@witchfindertr

The /friends/info endpoint should give you the necessary data.

The usernames of users can be found at response['data']['data']['data'][index]['username'] and the profile picture url of the users can be found at response['data']['data']['data'][index]['profilePicture']['url']

below is sample code to query for profile pictures given a user:

def getFriendProfilePicture(username):
  friends = response['data'].get('data', {}).get('data', [])
    for friend in friends:
      if friend.get('username') == username:
        friend_profile_picture = user_info.get('profilePicture')
        if friend_profile_picture:
          return profile_picture_info.get('url')
        else:
          return "Not found"

@witchfindertr Let me know if its that the solve for your issue pleas

witchfindertr commented 8 months ago

@witchfindertr

The /friends/info endpoint should give you the necessary data.

The usernames of users can be found at response['data']['data']['data'][index]['username'] and the profile picture url of the users can be found at response['data']['data']['data'][index]['profilePicture']['url']

below is sample code to query for profile pictures given a user:

def getFriendProfilePicture(username):
  friends = response['data'].get('data', {}).get('data', [])
    for friend in friends:
      if friend.get('username') == username:
        friend_profile_picture = user_info.get('profilePicture')
        if friend_profile_picture:
          return profile_picture_info.get('url')
        else:
          return "Not found"

thank you bro but ı need any user profile image

witchfindertr commented 8 months ago

not working for me https://mobile.bereal.com/api/search/profile?query=[usernamehere]&limit=20

chemokita13 commented 8 months ago

not working for me https://mobile.bereal.com/api/search/profile?query=[usernamehere]&limit=20

whats the error ?

witchfindertr commented 8 months ago

not working for me https://mobile.bereal.com/api/search/profile?query=[usernamehere]&limit=20

whats the error ?

ı dont know maybe new param

witchfindertr commented 8 months ago

not working for me https://mobile.bereal.com/api/search/profile?query=[usernamehere]&limit=20

whats the error ?

this is possiple please try :(

chemokita13 commented 8 months ago

not working for me https://mobile.bereal.com/api/search/profile?query=[usernamehere]&limit=20

whats the error ?

this is possiple please try :(

let me some time to search whats the error, maybe there is a new endpoint

witchfindertr commented 8 months ago

not working for me https://mobile.bereal.com/api/search/profile?query=[usernamehere]&limit=20

whats the error ?

this is possiple please try :(

let me some time to search whats the error, maybe there is a new endpoint

any update ? https://mobile.bereal.com/api/search/profile?query=[usernamehere]&limit=20 Have you tried this sir?

chemokita13 commented 6 months ago

not working for me https://mobile.bereal.com/api/search/profile?query=[usernamehere]&limit=20

whats the error ?

this is possiple please try :(

let me some time to search whats the error, maybe there is a new endpoint

any update ? https://mobile.bereal.com/api/search/profile?query=[usernamehere]&limit=20 Have you tried this sir?

Sorry for let! I will try it!