Esempio n. 1
0
        public async Task <JToken> cdCreateSignup(signupAccount mysignupAccount)
        {
            cdCallAPI mycallAPI = new cdCallAPI();
            var       response  = await mycallAPI.cdCallPutAPI(App.cdAuthAPIURL, mysignupAccount, App.cdAuthKey);

            return(response);
        }
Esempio n. 2
0
        public async Task <JToken> cdcallClubMemberPUT(ClubMembers regacccount)
        {
            cdCallAPI mycallAPI = new cdCallAPI();
            var       response  = await mycallAPI.cdCallPutAPI(App.cdClubMemberAPIPutPost, regacccount, App.cdClubMemberKey);

            return(response);
        }
Esempio n. 3
0
        public async Task <JToken> cdcallEventsMemberPUT(cdEventSignups regEvent)
        {
            cdCallAPI mycallAPI = new cdCallAPI();
            var       response  = await mycallAPI.cdCallPutAPI(App.cdEventRegAPIPutPost, regEvent, App.cdEventRegKey);

            return(response);
        }
Esempio n. 4
0
        public async Task <JToken> cdcallClubsPUT(Club regClub)
        {
            cdCallAPI mycallAPI = new cdCallAPI();
            var       response  = await mycallAPI.cdCallPutAPI(App.cdClubAPIPutPost, regClub, App.cdClubKey);

            return(response);
        }
Esempio n. 5
0
        public async Task <JToken> cdcallAccountsPUT(Account regacccount)
        {
            cdCallAPI mycallAPI = new cdCallAPI();
            var       response  = await mycallAPI.cdCallPutAPI(App.cdAccountAPIPutPost, regacccount, App.cdAccountKey);

            return(response);
        }
Esempio n. 6
0
        public async Task <JToken> cdcallDriverAllocPUT(DriverAllocation dalloc)
        {
            cdCallAPI mycallAPI = new cdCallAPI();
            var       response  = await mycallAPI.cdCallPutAPI(App.cdDriverAllocURLPutPost, dalloc, App.cdDriverAllocationKey);

            return(response);
        }
Esempio n. 7
0
        public async Task <JToken> cdSendLocation(cdLocation dloc)
        {
            System.Diagnostics.Debug.WriteLine("  Location is " + dloc.cdLongitude + " " + dloc.cdLatitude);
            System.Diagnostics.Debug.WriteLine("  Trip ID is " + dloc.TripID);
            cdCallAPI mycallAPI = new cdCallAPI();
            var       response  = await mycallAPI.cdCallPutAPI(App.cdTrackLocPutPost, dloc, App.cdDriverLocationKey);

            return(response);
        }
Esempio n. 8
0
        public async Task <JToken> cdcallEmailPUT(String EventID, String EventName, String myClubID, String ClubName, String EventDate)
        {
            const String emailcount = "3";
            String       consEmails = "";
            cdEmails     eventEmail = new cdEmails();

            eventEmail.EmailID      = EventID;
            eventEmail.EmailCount   = emailcount;
            eventEmail.EventName    = EventName;
            eventEmail.ClubName     = ClubName;
            eventEmail.Attr1        = EventDate;
            eventEmail.Attr2        = "None";
            eventEmail.Attr3        = "None";
            eventEmail.Attr4        = "None";
            eventEmail.Attr5        = "None";
            eventEmail.Attr6        = "None";
            eventEmail.Attr7        = "None";
            eventEmail.Attr8        = "None";
            eventEmail.Attr9        = "None";
            eventEmail.Attr10       = "None";
            eventEmail.EmailSubject = "Signup for new event - " + EventName;
            eventEmail.EmailBody    = "Please sign up for a new event " + EventName + " on " + EventDate + " , of your " + ClubName + " by logging on to clubhives App";
            cdCallAPI      mycallAPI = new cdCallAPI();
            cdQueryAttr    qryAcct   = new cdQueryAttr();
            getClubMembers cdcm      = new getClubMembers();

            qryAcct.ColIndex  = "IndexName";
            qryAcct.IndexName = "ClubIDIndex";
            qryAcct.ColName   = "ClubID";
            qryAcct.ColValue  = myClubID;
            var jsreponse = await mycallAPI.cdcallAccountsGET(qryAcct);

            cdcm = JsonConvert.DeserializeObject <getClubMembers>((string)jsreponse);
            int counter = 0;

            foreach (var stacc in cdcm.ClubMember)
            {
                if (counter == 0)
                {
                    consEmails = stacc.Attr2;
                    counter    = counter + 1;
                }
                else
                {
                    consEmails = consEmails + " | " + stacc.Attr2;
                }
            }

            eventEmail.EmailAddress = consEmails;

            var response = await mycallAPI.cdCallPutAPI(App.cdEmailAPIPutPost, eventEmail, App.cdClubMemberKey);

            return(response);
        }