Skip to content

Commit

Permalink
Merge pull request #14 from themiszamani/master
Browse files Browse the repository at this point in the history
changed the terms url and HTTP header from Content-type to Accept
  • Loading branch information
skanct committed Aug 26, 2015
2 parents 3d35954 + 8b9c2af commit 976bd78
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 16 deletions.
2 changes: 1 addition & 1 deletion content/guides/examples/authcurl.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ order: 1
The request in curl

<pre><code>
curl -D- -u "YOURUSERNAME:YOURPASSWORD" -X GET -H "Content-Type: application/json" https://epic.grnet.gr/api/v2/handles/
curl -D- -u "YOURUSERNAME:YOURPASSWORD" -X GET -H "Accept: application/json" https://epic.grnet.gr/api/v2/handles/
</code></pre>

2 changes: 1 addition & 1 deletion content/guides/examples/getcurl.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ order: 1
The request in curl

<pre><code>
curl -D- -u "YOURUSERNAME:YOURPASSWORD" -X GET -H "Content-Type: application/json" https://epic.grnet.gr/api/v2/handles/11239/05C3DB56-5692-11E3-AF8F-1C6F65A666B5
curl -D- -u "YOURUSERNAME:YOURPASSWORD" -X GET -H "Accept: application/json" https://epic.grnet.gr/api/v2/handles/11239/05C3DB56-5692-11E3-AF8F-1C6F65A666B5
</code></pre>

2 changes: 1 addition & 1 deletion content/guides/examples/listcurl.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ order: 1
The request in curl

<pre><code>
curl -D- -u "YOURUSERNAME:YOURPASSWORD" -X GET -H "Content-Type: application/json" https://epic.grnet.gr/api/v2/handles/11239/
curl -D- -u "YOURUSERNAME:YOURPASSWORD" -X GET -H "Accept: application/json" https://epic.grnet.gr/api/v2/handles/11239/
</code></pre>

2 changes: 1 addition & 1 deletion content/guides/examples/listdetailscurl.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ order: 1
The request in curl

<pre><code>
curl -D- -u "YOURUSERNAME:YOURPASSWORD" -X GET -H "Content-Type: application/json" -H "Depth:1" https://epic.grnet.gr/api/v2/handles/11239/
curl -D- -u "YOURUSERNAME:YOURPASSWORD" -X GET -H "Accept: application/json" -H "Depth:1" https://epic.grnet.gr/api/v2/handles/11239/
</code></pre>

4 changes: 4 additions & 0 deletions content/guides/examples/listphp.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ curl_setopt($curl,CURLOPT_URL,$GETPIDURL);
curl_setopt($curl, CURLOPT_USERPWD, $PIDSERVICE_USER.":".$PIDSERVICE_PASSWD);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);

// Set the necessary header (json output)
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Accept:application/json"));


// Include header in result? (0 = yes, 1 = no)
curl_setopt($curl, CURLOPT_HEADER, 0);
// Should cURL return or print out the data? (true = return, false = print)
Expand Down
3 changes: 3 additions & 0 deletions content/guides/examples/listpython.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ opener = urllib2.build_opener(handler)
# use the opener to fetch a URL
opener.open(PIDSERVICE_URL)

#create the headers (json output)
REQUESTDATA.add_header('Accept','application/json')

# Install the opener.
# Now all calls to urllib2.urlopen use the created opener.
urllib2.install_opener(opener)
Expand Down
12 changes: 7 additions & 5 deletions content/guides/examples/listres.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ order: 1
After a successful request, the response consists of a list of PIDs

<pre><code>
GRNET
66742AB2-5685-11E3-A413-1C6F65A666B5
305F66A9-3994-42D6-A9F6-8E629126DE14
B4CF7AEA-55BB-4DB5-9D85-EB2DAD821B07
0CEEA495-71FA-460B-97A4-81E7E597B636
[
"GRNET",
"66742AB2-5685-11E3-A413-1C6F65A666B5",
"305F66A9-3994-42D6-A9F6-8E629126DE14",
"B4CF7AEA-55BB-4DB5-9D85-EB2DAD821B07",
"0CEEA495-71FA-460B-97A4-81E7E597B636",
]
</code></pre>

2 changes: 1 addition & 1 deletion content/guides/examples/searchcurl.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ order: 1
The request in curl

<pre><code>
curl -D- -u "YOURUSERNAME:YOURPASSWORD" -X GET -H "Content-Type: application/json" https://epic.grnet.gr/api/v2/handles/11239/?URL=*grnet*
curl -D- -u "YOURUSERNAME:YOURPASSWORD" -X GET -H "Accept: application/json" https://epic.grnet.gr/api/v2/handles/11239/?URL=*grnet*
</code></pre>

3 changes: 3 additions & 0 deletions content/guides/examples/searchphp.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ curl_setopt($curl,CURLOPT_URL,$GETPIDURL);
curl_setopt($curl, CURLOPT_USERPWD, $PIDSERVICE_USER.":".$PIDSERVICE_PASSWD);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);

// Set the necessary header (json output)
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Accept:application/json"));

// Include header in result? (0 = yes, 1 = no)
curl_setopt($curl, CURLOPT_HEADER, 0);
// Should cURL return or print out the data? (true = return, false = print)
Expand Down
12 changes: 7 additions & 5 deletions content/guides/examples/searchres.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ order: 1
After a successful request, the response consists of a list of PIDs containing this term.

<pre><code>
GRNET
66742AB2-5685-11E3-A413-1C6F65A666B5
305F66A9-3994-42D6-A9F6-8E629126DE14
B4CF7AEA-55BB-4DB5-9D85-EB2DAD821B07
0CEEA495-71FA-460B-97A4-81E7E597B636
[
"GRNET",
"66742AB2-5685-11E3-A413-1C6F65A666B5",
"305F66A9-3994-42D6-A9F6-8E629126DE14",
"B4CF7AEA-55BB-4DB5-9D85-EB2DAD821B07",
"0CEEA495-71FA-460B-97A4-81E7E597B636"
]
</code></pre>

File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion layouts/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</span>

<ul class="footer-cell">
<li><a href='/other/oroi/index.html'>Όροι Χρήσης</a> | <a href='/other/oroien/index.html'> Terms of use</a></li>
<li><a href='/terms/el/index.html'>Όροι Χρήσης</a> | <a href='/terms/en/index.html'> Terms of use</a></li>
</ul>
</div>

Expand Down

0 comments on commit 976bd78

Please sign in to comment.