How to programmatically add, remove, or block people on Steam through a button - steam-web-api

There are many sites such as www.tf2outpost.com and www.bazaar.tf where users can add other steam users through the click of a button. How exactly do you accomplish this? There's nothing in the web API that shows you how to add friends.
EDIT: I have found this code: steam://friends/add/some_steam_id Can you modify this code to block/remove people if you have their steam id?

All that URL does is ask your locally installed Steam client to add a fried of the id matching the number after /add/. So if you have another users steam id you can add them by putting their id in that URL like this: steam://friends/add/your_new_friends_id
you can try this yourself by just pasting the url in most any internet browser and steam will popup with a message saying "Your New Friend has been added to your friends list"
Currently the friends command accepts the following subcommands:
add/<id>
Adds user with specified id number
friends/<id>
Shows list of users with whom you recently played
joinchat/<id>
Joins a chat with a specified id number
message/<id>
Send a message
players
Shows table of recent players you've played with
settings/hideoffline
Toggle offline friends from friends list
settings/showavatars
Toggle avatars in friends list
settings/sortbyname
Sorts friends list by name
status/away
Sets status as away
status/busy
Sets status as busy
status/trade
Sets status as looking to trade
status/play
Sets status as looking to play
status/offline
Sets status as offline
status/online
Sets status as online
It appears there currently is no command (at least not public) for blocking/removing people. Such a command would be fairly useless, and would allow for... mischief. You should just manually remove/block people you no longer wish to be friends with; there would be no convenience added from being able to do this from a browser. What exactly are you trying to accomplish?
See the Steam Browser API documentation for complete details about the friends command and other commands.
P.S. its probably a good idea to avoid posting other peoples steam user ids here.

Related

Branch.io: detect first install from Unity

Trying to detect the first install event from branch.io link (succesfully implement link creating and sharing). I am using Unity branch sdk. The feature i try to create:
user_1 creates and share link to user_2.
When user_2 opens the link and install app i need to reward both of them (with inner in-game coins)
So i succesfully implement the 1. but I cant understand how to detect is user_2 installs the app or simply open it. All data that comes from branch.io UniversalObject callback doesn't contain information that i need.
Which the correct way to detect the install from code?
Alex from Branch here.
The callback parameter you need is +is_first_session. This is one of the parameters returned when the Branch session is initiated each time your app opens (you can find all all these parameters here). If this returns true, then that device has just installed the app (instead of opening it).
However, note that when these parameters are returned, it's impossible to immediately determine if the user is new (what you want), the device is new (not what you want, since the reward could be given twice if the user has installed on multiple devices), or neither (the user deleted the app and reinstalled on the same device). You would probably want to hold off on actually awarding the referral points until after the user has logged in with some sort of unique ID.
Branch also has a built-in feature for tracking referral points that might be useful. That lets you configure all the rules using the dashboard UI instead of needing to do it programmatically inside your app.

Error accessing Birthday variable using Watir during gmail sign-up

I am trying to create the gmail account through watir. As part of it while I am trying to select the birthday using div element I am unable to do.
I tried with the below one:
#ie.div(:text,'May').click
My system configurations:
IE-8
Windows-7
I've always disliked seeing the answers on here that say 'Why are you doing this?" or "Why would you want to do this?". So I'll just say "Don't do this!". I'm sure whatever issue you are facing can be resolved without automating the creation of gmail account.
If all you need is a unique gmail address then see the link below:
http://www.codestore.net/store.nsf/unid/BLOG-20111201-0411
Another option is https://mailinator.com/
As #titusfortner indicates, that element cannot be selected/clicked because it is not visible. Using watir-webdriver, this snippet makes the dropdown menu visible so its options can be selected:
b.div(title: "Birthday").when_present.click
b.div(text: "May").when_present.click
That being said, there are two other (read: larger) issues:
You won't be able to script your way past the captcha.
Google doesn't want you doing this. That's why the captcha is there, and they'll eventually block your IP if you consistently automate/script against them.
You can't click on the text of something that is not visible on the page. You first need to open the drop-down:
browser.span(id: 'BirthMonth').click
browser.div(text: 'May').click
b.element(:css, '#BirthMonth > div').click
b.element(:text, 'May').click
It works with Chrome and with Firefox also but not perfect

How can i count currently connected users in my lotus application (nsf)?

I have an xpage application and i simply want to count open sessions (anonymous users) or logged in users or both, and display this info on a page.
This question http://bit.ly/1sUMt8m is still open without solution.
Any ideas how to do that?
You can obtain this information from the console. show users will give you all users and their open databases. show opendatabases shows the databases and reads. See the documentation for details.
So you could use sessionAsSigner and issue the console command from your code. Add -xml to get the response in a format you can parse with certainty.
The measure is slightly crude since a user could have closed a window while the session is still valid.
Short of that you would need some JS trickery

TFS 2010 Email Alerts

I found this post, which seems to be an exact duplicate, but I can't figure out how to get the answer to work for me so I'm posting again...
TFS2010: Set up an alert that will email a member in the team when a work item is assigned to them
I want anyone (not everyone) using TFS to receive an email when they are assigned an item or when an item assigned to them changes. So, when the alert happens, the person who is currently assigned the item will receive an email.
I know I can set up this on a per-person basis with Alerts Explorer, but I can't figure out how to do this for everyone at once.
I looked at https://tfsalerts.codeplex.com/, but it looks like it's used to send alerts to groups of people...I only want to send the alert to a single relevant person (the equivalent of #Me). If this tool can do that, I'm not sure how to make it do so.
what you want to do is write a TFS Server Plugin. This plugin will fire whenever a certain event occurs. In your case, you will want to catch the WorkItemChangedEvent. In the notification, you will find old and new values of each field. By checking whether the assigned to field changed, you will know whether the WI has been reassigned.
Once you determined that the WI has been reassigned, you can take the New Value, and go to Active Directory (assuming you're using it), and get the email address. Finally, send a message.
For a code example of writing a robust server plugin (that happens to target the WorkItemChangedEvent, check out this blog post: How to Write a Robust TFS Server Plugin

Help me build this tool in windows envoirnment

I made a desktop music application in adobe air.
I want to update the status of some IM clients running EG: Yahoo messenger,Gtalk,AIM,MSN etc.
with the current playing song.
I am not desktop developer.This is first time i am making something for desktop.
SO is there any way in any Programming language that i can make something which will change the Data (Status message) of a running IM client.
Please Just guide me through this problem .
Edit: I dont want to ask for username/password of users IMs accounts , so via API is not a solution in this case .
It will be like Person X running mine music application and also logged to various third party IM clients (YIM,Gtalk etc).
SO if he is playing a song in the music application , then mine app will update presence status message on the IM clients to " Listening to bla bla song ".
So it is like high-jacking/Hacking the data of the running third party IM client.
Have a look at libpurple, it might have the functionality you require.
There is also telepathy, but I think it is related to the former somehow (one uses the other or they do the same thing).
EDIT: for the recent edit: it looks to me like you want something like MSN Messenger displaying the currently playing track in Windows Media Player. This requires a plugin for the messaging client, no way around that.
Perhaps an easier way to get this done would be to develop a plugin for one of the numerous multi-platform IM clients such as GAIM or Trillian. This would let you target stuff across the board without undue effort . . .
I think your only option is to write a plugin for each chat client you want to target, which could take some time.
So let me suggest an alternative: Add last.fm audioscrobbler support to your application. You would simply send the Now Playing info to last.fm via the API (http://www.last.fm/api/submissions), and it will appear on the user's profile page. Most music players already support this method because it's a pretty popular service, and a lot of people link to their last.fm profiles on their blog/facebook/etc.

Resources