AJ

  • Newbie
  • Posts: 21
  • Trades: 3

[Lestrades.com] Nao 尚

  • I'm Share-Locked
  • Administrator
  • Posts: 1,357
  • Trades: 217

AJ

  • Newbie
  • Posts: 21
  • Trades: 3

[Lestrades.com] Nao 尚

  • I'm Share-Locked
  • Administrator
  • Posts: 1,357
  • Trades: 217
Re: What's up at Lestrade's?
« Reply #783,  »
I've had a quick look at the URL system.
Apparently, the code does check for a Steam ID when the URL is in the format /profiles/123456
I didn't know what to change to make sure it was... I'm pretty sure nothing was needed, but you can also use the format /profils/steamid123456 and then you can be sure it won't be mixed up with something else.

Anyway, TL;DR: I'd already implemented Steam ID redirection years ago, simply forgot about it, and it's /profiles/(steam ID)

AJ

  • Newbie
  • Posts: 21
  • Trades: 3
Re: What's up at Lestrade's?
« Reply #784,  »
Quote from [Lestrades.com]Nao 尚 on December 28th, 2020, 10:34 PM
Anyway, TL;DR: I'd already implemented Steam ID redirection years ago, simply forgot about it, and it's /profiles/(steam ID)
But the problem is how do I create a Lestrades.com link when the URL of the Steam profile is in the "/id/(Steam custom names)" format and the names in the URL are different in both webpages of the Steam and Lestrades.com, e.g. like yours?

[Lestrades.com] Nao 尚

  • I'm Share-Locked
  • Administrator
  • Posts: 1,357
  • Trades: 217
Re: What's up at Lestrade's?
« Reply #785,  »
I don't get it... You can provide a custom name in the @ url format, or a steam ID if there's no custom name... The /profiles/ shortcut is only there if you reliably have a steam ID, and want to make sure you're redirected to the proper user profile.

Happy new year everyone, by the way..!

AJ

  • Newbie
  • Posts: 21
  • Trades: 3
Re: What's up at Lestrade's?
« Reply #786,  »
The Steam ID format is no problem here because it's a unique number.  But to use a Steam custom name in the URL for a Lestrades.com profile could be a little tricky for creating a link for that profile because they might be different for some reasons.  For example, your custom name in the URL on the Steam profile is: "../id/naogilles/" but on the Lestrades.com is:  "../@Nao/".   Therefore, I can't use the custom name to create the Lestrades.com profile link because there is no such URL ("../@naogilles/") on the Lestrades.com.  Any idea to have a workaround about this? 

And, Happy New Year 2021, too!!! 

[Lestrades.com] Nao 尚

  • I'm Share-Locked
  • Administrator
  • Posts: 1,357
  • Trades: 217
Re: What's up at Lestrade's?
« Reply #787,  »
I see what you mean, now. For some reason, I thought the LT user name was taken from the Steam user name. It is not.
Thing is, Lestrade's doesn't store Steam user names at all, it gets the Steam ID through the API, and then stores that.
When logging in, one of the response elements has the proper ID in it. That's what I store, and then I move onto other things.
I'm sorry that I can't help in this regard.
I could, ideally, add some code to turn a Steam user name into a Steam ID on the fly, by doing a request internally, but it'd imply doing some exchanges between LT and the Steam server, and as you know, there's a limit to how much I can do per day, so if someone decided to write a quick script to request a Steam ID from a random, non-existent Steam user name, they might be able to get Steam to softban Lestrade's for a while, and make it work less reliably.
What I'd suggest is to look into your own side, see if there's a way to get an ID from a user name, perhaps with some quick Ajax code. I could even help you with that, if you're not sure how to do it.

AJ

  • Newbie
  • Posts: 21
  • Trades: 3
Re: What's up at Lestrade's?
« Reply #788,  »
Thanks for the tips and I definitely need and welcome any help!

But I'm not sure I understand your first two paragraphs above.  My question is:  Since the LT's already get the Steam user ID in the first place and store them in the LT's server, why not just put it on the URL of the LT's instead of the inconsistent user names?  And why would this make LT's less reliably?

And about getting the Steam user ID, do you have any experience with Steam API, e.g. to retrieve the Steam users' data(ID, library...etc), games info, and market items info?  I really want to learn it.  Any suggestion for a good place to start from?

[Lestrades.com] Nao 尚

  • I'm Share-Locked
  • Administrator
  • Posts: 1,357
  • Trades: 217
Re: What's up at Lestrade's?
« Reply #789,  »
There are urls I believe you can simply call to get the info you need, no need to get an API key etc, but I'd need to look into that.

As for showing a custom user name instead of a steam id, that's because Lestrade's uses the wedge codebase and, even though I wrote that as well, it'd take a long time to rewrite that and there's no real reason for me to do it, since it's also convenient to allow users to change their user name here.
Re: What's up at Lestrade's?
« Reply #790,  »
New feature (been a long time!) for maintaining your libraries, most specifically for choosing new games to play...
Just choose a tag on a game page, refine it as needed (e.g. Hidden object + Match-3), this gives you a list of games with these two tags combined. So that's a good thing to find games, but it was already there. Now, click sort by rating to see the best of the bunch.

Here's the new one. Now you can now select the Show Owned games option in the Premium menu at the top of the list. This will show you the best of the bunch in your library so you can easily find something to play. Alternatively, if you're looking for a game to BUY or trade for, you can instead choose Show Unowned games, of course.

Either way, I've wanted to add this option for myself for a long time, and now it's there. Enjoy it :)
Re: What's up at Lestrade's?
« Reply #791,  »
Fixed a bug in the new sorting feature, where owned/unowned games were only showed correctly if you selected a secondary tag or main sorting option first. Sorry about that, should have double-checked.
Re: What's up at Lestrade's?
« Reply #792,  »
Note that since Lestrade's is now 95% a game library handling tool, rather than strictly a game trading tool, I'm open to suggestions on things to sort your library (or non-library) with. I don't know if other websites have ways for you to find some specific games by some very specific data (e.g. card numbers or whatever), but if you can't find any, maybe it's just a matter of minutes for me to add an option to the site. I can't say I'll say yes to everything, but doing the feature above was really fun, and I find myself using it a lot.

Akylen

  • Full Member
  • Posts: 212
  • Trades: 60
Re: What's up at Lestrade's?
« Reply #793,  »
For me it is more about how to sort my games from different stores now. The rest is doing fine :)

[Lestrades.com] Nao 尚

  • I'm Share-Locked
  • Administrator
  • Posts: 1,357
  • Trades: 217
Re: What's up at Lestrade's?
« Reply #794,  »
Aren't they already sorted by store in your lists..? (Not in non-user-related lists, though... okay...)