Latest discussions
doc.tags.X format changes
Updated 5 months ago
[BUG] Number of calls for the last hour
Updated 6 months ago
8 replies
XML-RPC not working?
Updated 12 months ago
3 replies
album.getList requires user_id
Updated 12 months ago
2 replies
New group API methods + group suggestion
Updated 12 months ago
8 replies
PDF version of documentation
Updated 13 months ago
14 replies
doc.search limit
Updated 13 months ago
12 replies
[done] User alias and user ID for using in user_id
EXIF
Updated 13 months ago
5 replies
Ipernity::API for Perl
Updated 13 months ago
3 replies
... view all the discussions

[done] User alias and user ID for using in user_id

posted by Dirk
Posted on Tuesday October 14, 2008 at 18:24. 383 visits. ( permalink )
If i do a doc.search call with user_id='dirk', i’ll get an error message “User not found”. But if i call with user_id=19181 it all works fine.

Would be great, if i could pass the user alias directly as user_id, because i can’t find my user ID here at ipernity, i only find my user alias (well, i found my user ID in the help system here at ipernity), and i don’t want to compel my users to do some research and use some bugs (i don’t know, if the using of the user ID instead of the user alias in the help system is a bug *g*) just for using my stuff :)

Conclusion: user_id should work with the user ID and the user alias in the same way.

Alternative: Make it easy to get the own user ID via ipernity web site.
Alternative 2: Create a getUserID-function to resolve the user alias to the user ID.

11 Replies

Doomshammer says:
The UserID is provided through the "auth.getToken" and "auth.checkToken" function

Here is what I do... after fetching the auth token, I store the authtoken and the user inforamtion in the module reference. Looks like this:

'auth' => {
'realname' => 'Winfried Neessen',
'userid' => '12345',
'authtoken' => '12345-54321-a123ca098ca12345',
'username' => 'Doomshammer'
},
Posted 13 months ago. ( permalink )
Doomshammer edited this reply 13 months ago.
Dirk pro replies:
The problem is: This will be a Wordpress plugin, so it will be distributed in plain PHP.

No API secret in my PHP code! :)

I don’t want to do the whole auth process just for displaying content. I don’t want to match user names to user ids. I just want to provide the user name or the user id to user_id. Manually, for searching documents of a specified user (namely the user, who will use my Wordpress plugin will provide the username by himself).


--
Coming from a group home page (?)
Posted 13 months ago. ( permalink )
Doomshammer replies:
Ahh, got it- yeah in this case a getUserid() function would be helpful. I agree
Posted 13 months ago. ( permalink )
A Christophe Ruelle pro says:
We have to add some values like your user_id, latest doc_ids, latest albums, ... in the live try page. We will also add new methods for user and groups this week.
Posted 13 months ago. ( permalink )
Roberto Ballerini - traveling pro says:
Anyway username isn't unique and you can modify it whenever you want; so only user_id and user webalias could be used to do a search.

--
Coming from a group home page (?)
Posted 13 months ago. ( permalink )
Chris pro replies:
For searching it doesn't matter if username is neither unique nor immutable.
The result would be a list of matching users.

But I think the webalias would be "enough", since that's easy to find out (in contrary to the user id)
Posted 13 months ago. ( permalink )
Dirk pro replies:
Posted 13 months ago. ( permalink )
Roberto Ballerini - traveling pro replies:
No! This is the webalias; username, as far as I now, is the Screenname, i.e. what appears near your icon in your comments, and it can changed whenever you want
Posted 13 months ago. ( permalink )
Dirk pro replies:
Okay, my fault. I used the wrong word ;)

--
Coming from a group home page (?)
Posted 13 months ago. ( permalink )
A Tristan says:
It has been fixed.
- doc.search
- album.getList
- ...
now support webalias (folder) or user_id
Thank you for helping us improving our api! :)
Posted 13 months ago. ( permalink )
Dirk pro replies:
Hooooray ;) Thanks!

I’ll test tonight (well, tonight i rewrite ipeRSS again, because my first API caused rewrite was a complete mess *g*):)

Edit: Tested. Works! Good job!
Posted 13 months ago. ( permalink )
Dirk edited this reply 13 months ago.

You must be logged on to post a reply. Sign in now?


rss Latest comments – Subscribe to the comment feed for this topic.

 

Català | Čeština nové | 中文 | Deutsch | English | Español | Esperanto | Ελληνικά | Français | Galego | Italiano | Nederlands | Português | More...