Beispiel #1
0
        private static List <MetaTuple> ProvisionKeys(string orgId, Fabric.Internal.Editor.API.V1 api)
        {
            List <MetaTuple> keys = new List <MetaTuple> ();

            keys.AddRange(ProvisionKeysForPlatform("android", orgId, api));
            keys.AddRange(ProvisionKeysForPlatform("ios", orgId, api));

            return(keys);
        }
Beispiel #2
0
        // This is called on a non-main thread.
        private static List <MetaTuple> ProvisionKeysForPlatform(string platform, string orgId, Fabric.Internal.Editor.API.V1 api)
        {
            string responseJson = api.HttpPost("/api/v3/organizations/" + orgId + "/twitter/tokens?platform=" + platform);

            Dictionary <string, object> response = Json.Deserialize(responseJson) as Dictionary <string, object>;
            string twitterKey    = response ["consumer_key"] as string;
            string twitterSecret = response ["secret"] as string;

            return(new List <MetaTuple> ()
            {
                new MetaTuple {
                    Key = TwitterKey, Value = twitterKey, Platform = platform
                },
                new MetaTuple {
                    Key = TwitterSecret, Value = twitterSecret, Platform = platform
                }
            });
        }
Beispiel #3
0
 public Controller(Fabric.Internal.Editor.API.V1 api)
 {
 }