Esempio n. 1
0
        static void Main(string[] args)
        {
            var periscopeApi = new PeriscopeApi();

            var loginTwitterRequest = new loginTwitterRequest
            {
            };
            var loginTwitter = periscopeApi.LoginTwitter(loginTwitterRequest);

            var userSearchRequest = new userSearchRequest
            {
                cookie = loginTwitter.cookie,
                search = args[0]
            };
            var userSearch = periscopeApi.UserSearch(userSearchRequest);

            var userBroadcastsRequest1 = new userBroadcastsRequest
            {
                cookie = loginTwitter.cookie,
                all = true,
                user_id = userSearch.First().id
            };
            var userBroadcasts = periscopeApi.UserBroadcasts(userBroadcastsRequest1);

            using (VideoDownloader videoDownloader = new VideoDownloader())
            {
                foreach (var userBroadcast in userBroadcasts)
                {
                    PDownload pDownload = new PDownload
                    {
                        User = userBroadcast.username,
                        Broadcast = userBroadcast.id,
                        DownloadLiveStream = true
                    };
                    videoDownloader.DownloadVideos(pDownload);
                }
            }
        }
Esempio n. 2
0
        static void Test()
        {
            var periscopeApi = new PeriscopeApi();

            var loginTwitterRequest = new loginTwitterRequest
            {
            };
            var loginTwitter = periscopeApi.LoginTwitter(loginTwitterRequest);

            var mapGeoBroadcastFeedRequest = new mapGeoBroadcastFeedRequest
            {
                cookie = loginTwitter.cookie,
                p1_lat = 80,
                p1_lng = 96,
                p2_lat = -48,
                p2_lng = -30,
                include_replay = true
            };
            var mapGeoBroadcastFeeds = periscopeApi.MapGeoBroadcastFeed(mapGeoBroadcastFeedRequest);

            var getBroadcastsRequest = new getBroadcastsRequest
            {
                cookie = loginTwitter.cookie,
                broadcast_ids = mapGeoBroadcastFeeds.Select(m => m.id).ToArray()
            };
            var getBroadcasts = periscopeApi.GetBroadcasts(getBroadcastsRequest);

            var suggestedPeopleRequest = new suggestedPeopleRequest
            {
                cookie = loginTwitter.cookie,
                twitter_consumer = loginTwitterRequest.session_key,
                twitter_secret = loginTwitterRequest.session_secret,
                languages = new[] { "tr" },
                signup = false
            };
            var suggestedPeople = periscopeApi.SuggestedPeople(suggestedPeopleRequest);

            var followingBroadcastFeedRequest = new followingBroadcastFeedRequest { cookie = loginTwitter.cookie };
            var followingBroadcastFeeds = periscopeApi.FollowingBroadcastFeed(followingBroadcastFeedRequest).ToList();

            var accessChannelRequest = new accessChannelRequest
            {
                cookie = loginTwitter.cookie,
                broadcast_id = followingBroadcastFeeds.First().id
            };
            var accessChannel = periscopeApi.AccessChannel(accessChannelRequest);

            var followingRequest = new followingRequest
            {
                cookie = loginTwitter.cookie,
                user_id = loginTwitter.user.id
            };
            var following = periscopeApi.Following(followingRequest);

            var getBroadcastViewersRequest = new getBroadcastViewersRequest
            {
                cookie = loginTwitter.cookie,
                broadcast_id = followingBroadcastFeeds.First().id
            };
            var getBroadcastViewers = periscopeApi.GetBroadcastViewers(getBroadcastViewersRequest);

            var helloRequest = new helloRequest
            {
                cookie = loginTwitter.cookie,
                locale = new[] { "tr" }
            };
            var hello = periscopeApi.Hello(helloRequest);

            var rankedBroadcastFeedRequest = new rankedBroadcastFeedRequest
            {
                cookie = loginTwitter.cookie,
                languages = new[] { "tr" }
            };
            var rankedBroadcastFeed = periscopeApi.RankedBroadcastFeed(rankedBroadcastFeedRequest);

            var userRequest = new userRequest
            {
                cookie = loginTwitter.cookie,
                user_id = loginTwitter.user.id
            };
            var userResponse = periscopeApi.User(userRequest);

            var userBroadcastsRequest = new userBroadcastsRequest
            {
                cookie = loginTwitter.cookie,
                all = true,
                user_id = loginTwitter.user.id
            };
            var userBroadcasts1 = periscopeApi.UserBroadcasts(userBroadcastsRequest);

            var userBroadcastsRequest2 = new userBroadcastsRequest
            {
                cookie = loginTwitter.cookie,
                all = false,
                user_id = followingBroadcastFeeds.First().id
            };
            var userBroadcasts2 = periscopeApi.UserBroadcasts(userBroadcastsRequest2);

            var userSearchRequest = new userSearchRequest
            {
                cookie = loginTwitter.cookie,
                search = "deneme"
            };
            var userSearch = periscopeApi.UserSearch(userSearchRequest);

            var getAccessPublic = periscopeApi.GetAccessPublic("1MYxNWZoBMNKw");
        }