Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96608448
PhrequentTrackingConduitAPIMethod.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, Dec 28, 20:52
Size
975 B
Mime Type
text/x-php
Expires
Mon, Dec 30, 20:52 (2 d)
Engine
blob
Format
Raw Data
Handle
23184734
Attached To
rPH Phabricator
PhrequentTrackingConduitAPIMethod.php
View Options
<?php
final
class
PhrequentTrackingConduitAPIMethod
extends
PhrequentConduitAPIMethod
{
public
function
getAPIMethodName
()
{
return
'phrequent.tracking'
;
}
public
function
getMethodDescription
()
{
return
pht
(
'Returns current objects being tracked in Phrequent.'
);
}
public
function
getMethodStatus
()
{
return
self
::
METHOD_STATUS_UNSTABLE
;
}
protected
function
defineParamTypes
()
{
return
array
();
}
protected
function
defineReturnType
()
{
return
'array'
;
}
protected
function
execute
(
ConduitAPIRequest
$request
)
{
$user
=
$request
->
getUser
();
$times
=
id
(
new
PhrequentUserTimeQuery
())
->
setViewer
(
$user
)
->
needPreemptingEvents
(
true
)
->
withEnded
(
PhrequentUserTimeQuery
::
ENDED_NO
)
->
withUserPHIDs
(
array
(
$user
->
getPHID
()))
->
execute
();
$now
=
time
();
$results
=
id
(
new
PhrequentTimeBlock
(
$times
))
->
getCurrentWorkStack
(
$now
);
return
array
(
'data'
=>
$results
);
}
}
Event Timeline
Log In to Comment