Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F106123206
showclix.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Mar 22, 17:56
Size
773 B
Mime Type
text/x-php
Expires
Mon, Mar 24, 17:56 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25019959
Attached To
rPH Phabricator
showclix.php
View Options
<?php
require
(
__DIR__
.
'/../bootstrap.php'
);
use
\Httpful\Request
;
// Get event details for a public event
$uri
=
"http://api.showclix.com/Event/8175"
;
$response
=
Request
::
get
(
$uri
)
->
expectsType
(
'json'
)
->
sendIt
();
// Print out the event details
echo
"The event {$response->body->event} will take place on {$response->body->event_start}
\n
"
;
// Example overriding the default JSON handler with one that encodes the response as an array
\Httpful\Httpful
::
register
(
\Httpful\Mime
::
JSON
,
new
\Httpful\Handlers\JsonHandler
(
array
(
'decode_as_array'
=>
true
)));
$response
=
Request
::
get
(
$uri
)
->
expectsType
(
'json'
)
->
sendIt
();
// Print out the event details
echo
"The event {$response->body['event']} will take place on {$response->body['event_start']}
\n
"
;
Event Timeline
Log In to Comment