Object subclass: #FooClient instanceVariableNames: 'token' classVariableNames: '' poolDictionaries: '' category: 'FooClient'! !FooClient commentStamp: 'tcj 4/24/2018 14:33' prior: 0! FooClient new getCalendarEntries FooClient new calendarEventsByDate ! ]style[(1 35 18 20 3),f1,,b,! !FooClient methodsFor: 'making requests' stamp: 'tcj 4/24/2018 16:54'! fetchToken | url postdata response | postdata := 'username={1}&password={2}&service={3}' format: { username . password . 'foo_test' }. " block_mhaairs_get_user_info 'core_calendar_get_calendar_events' " url := self siteRoot, '/login/token.php'. response := WebClient httpPost: url content: postdata type: 'application/x-www-form-urlencoded'. token := (WebUtils jsonDecode: response content readStream) at: 'token'. ^ token! ! !FooClient methodsFor: 'accessing' stamp: 'tcj 4/24/2018 15:16'! token ^ token ! ! !FooClient methodsFor: 'accessing' stamp: 'tcj 4/24/2018 15:16'! token: anObject token := anObject. ! !