Open Semantic Framework PHP API  3.0
 All Data Structures Namespaces Files Functions Variables Pages
RevisionReadQuery.php
Go to the documentation of this file.
1 <?php
2 
5 
11 
54  class RevisionReadQuery extends \StructuredDynamics\osf\php\api\framework\WebServiceQuery
55  {
64  function __construct($network, $appID, $apiKey, $userID)
65  {
66  // Set the OSF network & credentials to use for this query.
67  $this->setNetwork($network);
68  $this->appID = $appID;
69  $this->apiKey = $apiKey;
70  $this->userID = $userID;
71 
72  // Set default configarations for this web service query
73  $this->setSupportedMimes(array("text/xml",
74  "application/json",
75  "application/rdf+xml",
76  "application/rdf+n3",
77  "application/iron+json",
78  "application/iron+csv"));
79 
80  $this->setMethodGet();
81 
82  $this->mime("resultset");
83 
84  $this->setEndpoint("revision/read");
85 
86  // Set default parameters for this query
87  $this->sourceInterface("default");
88  $this->getRecord();
89  }
90 
100  public function revisionUri($uri)
101  {
102  $this->params["revuri"] = urlencode($uri);
103 
104  return($this);
105  }
106 
117  public function dataset($dataset)
118  {
119  $this->params["dataset"] = urlencode($dataset);
120 
121  return($this);
122  }
123 
133  public function getRevision()
134  {
135  $this->params["mode"] = 'revision';
136 
137  return($this);
138  }
139 
152  public function getRecord()
153  {
154  $this->params["mode"] = 'record';
155 
156  return($this);
157  }
158  }
159 
161 ?>
getRevision()
Specifies that you want the endpoint to return the full revision record, with all the information spe...
getRecord()
Specifies that you want the endpoint to return the record of that revision, without all the meta info...
revisionUri($uri)
Specifies the URI of the revision URI record to read.
dataset($dataset)
Specifies the dataset URI where the record is indexed.
Revision Read Query to a OSF Revision Read web service endpoint.
__construct($network, $appID, $apiKey, $userID)
Constructor.