PoshCode Archive  Check-in [57804731f0]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:This script will take a Twitter User’s Screen name and get their RSS feed of posts
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:57804731f0abc29a8c3c8ffc10612b84ba9dd0ba1f924f56479f725fd9154a27
User & Date: Booksurfers_ 2018-06-10 14:19:49
Context
2018-06-10
14:19
This script will take a Twitter User’s Screen name and get their RSS feed of posts check-in: 7fb65c3127 user: fernlivese tags: trunk
14:19
This script will take a Twitter User’s Screen name and get their RSS feed of posts check-in: 57804731f0 user: Booksurfers_ tags: trunk
14:19
The main goal of this function to not use additional libraries. check-in: 47479905f8 user: greg zakharov tags: trunk
Changes

Added Amma-Chimes.ps1.



































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# encoding: ascii
# api: powershell
# title: Amma Chimes
# description: This script will take a Twitter User’s Screen name and get their RSS feed of posts
# version: 0.1
# author: Booksurfers_
# license: CC0
# x-poshcode-id: 6712
# x-archived: 2017-02-02T03:22:17
# x-published: 2017-01-29T13:32:00
#
#
param ([String] $ScreenName)

$client = New-Object System.Net.WebClient
$idUrl = "https://api.twitter.com/1/users/show.json?screen_name=$ScreenName"
$data = $client.DownloadString($idUrl)

$start = 0

$findStr = '"id":'
do {
    $start = $data.IndexOf($findStr, $start + 1)
    if ($start -gt 0) {
        $start += $findStr.Length
        $end = $data.IndexOf(',', $start)
        $userId = $data.SubString($start, $end-$start)
    }
} while ($start -le $data.Length -and $start -gt 0)

$feed = "http://twitter.com/statuses/user_timeline/$userId.rss"

$feed