Пример #1
0
        static void Main(string[] args)
        {
            // Create new instance of class
            Sample sample = new Sample();

            // Set our access token
            // It is up to you to get this yourself
            // To get assistance with retrieving an access token, please follow the authentication tutorial
            // at http://developer.glitch.com/docs/auth/

            string accessToken = ""; // SET ACCESS TOKEN HERE

            // Instantiate our Glitch class, from which you will interact with the APIs
            Glitch glitch = new Glitch(accessToken);

            // Get a request with a specific method
            GlitchRequest request = glitch.GetRequest("players.fullInfo", new Dictionary<string, string>
                {
                    // Parameters go here
                    {"player_tsid", "PIF12K4LV4D1FCG"}
                });

            // Execute the request!
            request.Execute(sample);

            resetEvent.WaitOne(); // Hold the program until the async call completes
        }
Пример #2
0
 public GlitchRequest(String startMethod, Glitch startGlitch)
 {
     method     = startMethod;
     parameters = null;
     glitch     = startGlitch;
 }
Пример #3
0
        private Glitch glitch;          // Glitch parent instance

        #endregion


        #region Constructors

        public GlitchRequest(String startMethod, Dictionary <String, String> startParams, Glitch startGlitch)
        {
            method     = startMethod;
            parameters = startParams;
            glitch     = startGlitch;
        }
Пример #4
0
 public GlitchRequest(String startMethod, Glitch startGlitch)
 {
     method = startMethod;
     parameters = null;
     glitch = startGlitch;
 }
Пример #5
0
        private HttpWebRequest request; // Async request that interacts with API

        #endregion Fields

        #region Constructors

        public GlitchRequest(String startMethod, Dictionary<String, String> startParams, Glitch startGlitch)
        {
            method = startMethod;
            parameters = startParams;
            glitch = startGlitch;
        }