Request the communities a steam id is banned in.

        steamIDS: Comma-delimited list of SteamIDs
        format: Return format. None defaults to json. (json, xml, vdf)
439062
def get_player_bans(self, steamIDS, format=None):
        
        parameters = {'steamids' : steamIDS}
        if format is not None:
            parameters['format'] = format
        url = self.create_request_url(self.interface, 'GetPlayerBans', 1,
            parameters)
        data = self.retrieve_request(url)
        return self.return_data(data, format=format)
448567
function SteamSpy( options ) {
    if ( !(this instanceof SteamSpy) ) return new SteamSpy(options);

    this.VERSION = VERSION;
    this.options = extend(DEFAULTS, options);
    this.__request = request.defaults(this.options.request_options);
}
802298
def _coerce_client_id(client_id):
    
    if isinstance(client_id, type(u'')):
        client_id = client_id.encode('utf-8')
    if not isinstance(client_id, bytes):
        raise TypeError('{!r} is not a valid consumer group (must be'
                        ' str or bytes)'.format(client_id))
    return client_id
143481
def by_id(self, region, encrypted_summoner_id):
        
        url, query = SummonerApiV4Urls.by_id(
            region=region, encrypted_summoner_id=encrypted_summoner_id
        )
        return self._raw_request(self.by_id.__name__, region, url, query)
935313
def id(opts):
    '''
    
    '''
    r = salt.utils.http.query(opts['proxy']['url']+'id', decode_type='json', decode=True)
    return r['dict']['id'].encode('ascii', 'ignore')
1204862
function toChatID(steamID) {
  if (typeof steamID == 'string')
    steamID = SteamID.decode(steamID);
  
  if (steamID.accountType == Steam.EAccountType.Clan) {
    // this is a ClanID - convert to its respective ChatID
    steamID.accountInstance = SteamID.ChatInstanceFlags.Clan;
    steamID.accountType = Steam.EAccountType.Chat;
  }
  
  return steamID.encode();
}
1143956
def defineID(defid):
    
    json = _get_urban_json(UD_DEFID_URL + urlquote(str(defid)))
    return _parse_urban_json(json)
599434
public function communityIdToSteamId($community_id, $is_short = FALSE)
    {
        $temp = intval($community_id) - 76561197960265728;
        $odd_id = $temp % 2;
        $temp = floor($temp / 2);
        if ($is_short) {
            return $odd_id . ':' . $temp;
        } else {
            return 'STEAM_0:' . $odd_id . ':' . $temp;
        }
    }
714531
function (input, doNotGetIds) {
				var r = [];
				if (input) {
					if (typeof input == 'string') {
						if (input === "*") return input;
						r.push(input);
					}
					else {
						if (doNotGetIds) r = input;
						else {
							if (input.length) {
								for (var i = 0, j = input.length; i < j; i++)
									r.push(_info(input[i]).id);
							}
							else
								r.push(_info(input).id);
						}
					}
				}
				return r;
			}
381389
def get_formats(self, id, **data):
        
        
        return self.get("/formats/{0}/".format(id), data=data)
886554
def get(resource, params: {}, key: Steam.apikey)
      params[:key] = key
      response = @conn.get resource, params
      JSON.parse(response.body)
    rescue JSON::ParserError
      # If the steam web api returns an error it's virtually never in json, so
      #   lets pretend that we're getting some sort of consistant response
      #   for errors.
      { error: '500 Internal Server Error' }
    end
1167149
def create_request_url(self, profile_type, steamID):
        """"""
        regex = re.compile('^\d{17,}$')
        if regex.match(steamID):
            if profile_type == self.USER:
                url = "http://steamcommunity.com/profiles/%s/?xml=1" % (steamID)
            if profile_type == self.GROUP:
                url = "http://steamcommunity.com/gid/%s/memberslistxml/?xml=1" % (steamID)
        else:
            if profile_type == self.USER:
                url = "http://steamcommunity.com/id/%s/?xml=1" % (steamID)
            if profile_type == self.GROUP:
                url = "http://steamcommunity.com/groups/%s/memberslistxml/?xml=1" % (steamID)
        return url
264508
function verify(req, identifier, profile, done) {
    var validOpEndpoint = 'https://steamcommunity.com/openid/login';
    var identifierRegex = /^https?:\/\/steamcommunity\.com\/openid\/id\/(\d+)$/;

    if(req.query['openid.op_endpoint'] !== validOpEndpoint ||
       !identifierRegex.test(identifier)) {
      return done(null, false, { message: 'Claimed identity is invalid.' });
    }

    var steamID = identifierRegex.exec(identifier)[0];

    if(options.profile) {
      getUserProfile(options.apiKey, steamID, function(err, profile) {
        if(err) {
          done(err);
        } else {
          if(originalPassReqToCallback) {
            validate(req, identifier, profile, done);
          } else {
            validate(identifier, profile, done);
          }
        }
      });
    } else {
      if(originalPassReqToCallback) {
        validate(req, identifier, profile, done);
      } else {
        validate(identifier, profile, done);
      }
    }
  }
1331173
def get_steam_id(vanityurl, **kwargs):
    
    params = {"vanityurl": vanityurl}
    return make_request("ResolveVanityURL", params, version="v0001",
        base="http://api.steampowered.com/ISteamUser/", **kwargs)
68867
private List<WvWMatchDetail> getWvWMatchInfoUsingID(String[] ids) throws GuildWars2Exception {
		try {
			Response<List<WvWMatchDetail>> response = gw2API.getWvWMatchInfoUsingID(processIds(ids)).execute();
			if (!response.isSuccessful()) throwError(response.code(), response.errorBody());
			return response.body();
		} catch (IOException e) {
			throw new GuildWars2Exception(ErrorCode.Network, "Network Error: " + e.getMessage());
		}
	}
4573
def content_ids(params):
    
    # set up default values
    default_from, default_to, yesterday, _ = make_default_times()

    # get params
    try:
        series = params.get("site", [DEFAULT_SERIES])[0]
        from_date = params.get("from", [default_from])[0]
        to_date = params.get("to", [default_to])[0]
        group_by = params.get("group_by", [DEFAULT_GROUP_BY])[0]
        ids = params.get("content_id", [])
    except Exception as e:
        LOGGER.exception(e)
        return json.dumps({"error": e.message}), "500 Internal Error"

    # check the cache
    cache_key = "{}:{}:{}:{}:{}:{}:{}".format(
        memcached_prefix, "contentids.json", series, from_date, to_date, group_by, ids)
    try:
        data = MEMCACHED_CLIENT.get(cache_key)
        if data:
            return data, "200 OK"
    except Exception as e:
        LOGGER.exception(e)

    # enforce content ids
    if not len(ids):
        return json.dumps({"error": "you must pass at least one content id'"}), "400 Bad Request"

    # parse from date
    from_date = parse_datetime(from_date)
    if from_date is None:
        LOGGER.error("could not parse 'from'")
        return json.dumps({"error": "could not parse 'from'"}), "400 Bad Request"

    # parse to date
    to_date = parse_datetime(to_date)
    if to_date is None:
        LOGGER.error("could not parse 'to'")
        return json.dumps({"error": "could not parse 'to'"}), "400 Bad Request"

    # influx will only keep non-aggregated data for a day, so if the from param is beyond that point
    # we need to update the series name to use the rolled up values
    if from_date < yesterday:
        series = update_series(series, "pageviews", "content_id")

    # format times
    from_date = format_datetime(from_date)
    to_date = format_datetime(to_date)

    # start building the query
    query = "SELECT content_id, sum(value) as value " \
            "FROM {series} " \
            "WHERE time > '{from_date}' AND time < '{to_date}' " \
            "GROUP BY content_id, time({group_by}) " \
            "fill(0);"
    args = {"series": series, "from_date": from_date, "to_date": to_date, "group_by": group_by}

    # send the request
    try:
        res = INFLUXDB_CLIENT.query(query.format(**args))

    # capture errors and send them back along with the query (for inspection/debugging)
    except Exception as e:
        LOGGER.exception(e)
        return json.dumps({"error": e.message, "query": query.format(**args)}), "500 Internal Error"

    # build the response object
    response = flatten_response(res)

    # filter by content ids
    if len(ids):
        for site, points in response.items():
            filtered = filter(lambda p: p["content_id"] in ids, points)
            response[site] = filtered
    res = json.dumps(response)

    # cache the response
    try:
        MEMCACHED_CLIENT.set(cache_key, res, time=MEMCACHED_EXPIRATION)
    except Exception as e:
        LOGGER.exception(e)

    return res, "200 OK"
293701
def _formatIds(self, element, element_type):
        
        elementClause = None
        if isinstance(element, collections.Iterable):
            elements = []
            for _id in element:
                elements.append('?{} = <{}> '.format(
                    element_type, _id))
            elementClause = "({})".format(" || ".join(elements))
        return elementClause