Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
danmichaelo committed Jun 28, 2015
1 parent 57d1fb5 commit 398e016
Show file tree
Hide file tree
Showing 3 changed files with 139 additions and 6 deletions.
8 changes: 8 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,21 @@ This is the backend for the [Colligator frontend](https://github.com/scriptotek/
Fetch deps:

composer install
npm install
cp .env.example .env
php artisan key:generate

and modify `.env` as needed.

php artisan serve

This project adheres to the PSR-2 style guide,
so you might want to use to install
[php-cs-fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer)
to

php-cs-fixer fix $file --level=psr2

## CLI

Create a collection and harvest bibliographic records, etc. (draft)
Expand Down
135 changes: 130 additions & 5 deletions resources/views/welcome.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
}
body {
margin: 0;
max-width: 940px;
margin: auto;
padding: 0;
width: 100%;
color: #B0BEC5;
display: table;
font-weight: 100;
font-family: 'Lato';
color: #444;
}
.container {
Expand All @@ -32,20 +32,145 @@
}
.title {
color: #B0BEC5;
font-size: 96px;
margin-bottom: 40px;
}
.quote {
text-align: left;
}
h2 {
font-size: 24px;
font-family: monospace;
font-weight: normal;
}
h3 {
font-size: 16px;
font-weight: normal;
font-style: italic;
}
a, a:visited {
text-decoration: none;
color: blue;
}
a:hover {
text-decoration: underline;
}
table {
border-spacing: 0;
border-collapse: collapse;
}
td {
padding: 4px;
border-top: 1px solid #eee;
border-bottom: 1px solid #eee;
}
</style>
</head>
<body>
<div class="container">
<div class="content">
<div class="title">Laravel 5</div>
<div class="quote">{{ Inspiring::quote() }}</div>
<div class="title"> &gt; oh, the colligator &lt;</div>
<div class="quote">

<h2>GET /api/collections</h2>
<p>
List collections.
</p>
<h3>
Examples:
</h3>
<ul>
<li>
<a href="/api/collections">/api/collections</a>
– <em>all collections</em>
</li>
</ul>

<h2>GET /api/documents</h2>
<p>
List documents.
</p>

<h3>Parameters:</h3>
<table>
<tr>
<th>Parameter</th>
<th>Description</th>
</tr>
<tr>
<td>
<tt>collection</tt>
</td>
<td>
Numeric collection id
</td>
</tr>
<tr>
<td>
<tt>real</tt>
</td>
<td>
Subject heading from the 'Realfagstermer' vocabulary.
</td>
</tr>
<tr>
<td>
<tt>q</tt>
</td>
<td>
Query using the <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/search-uri-request.html">ElasticSearch URI search syntax</a>.
</td>
</tr>
<tr>
<td>
<tt>offset</tt>
</td>
<td>
Offset the list of returned results by this amount. Default is zero.
</td>
</tr>
<tr>
<td>
<tt>limit</tt>
</td>
<td>
Number of items to retrieve. Default is 25, maximum is 100.
</td>
</tr>
</table>

<h3>
Examples:
</h3>
<ul>

<li>
<a href="/api/documents?collection=1&real=Havforskning">
/api/documents?collection=1&amp;real=Havforskning
</a>
<em>documents in the 'samling42' collection indexed with
the 'Havforskning' subject part of the
'Realfagstermer' vocabulary (prefix 'real')</em>
</li>

<li>
<a href="/api/documents?collection=1&creator=x90053072">
creator.id:x90053072
</a>
<em>documents having
<a href="https://authority.bibsys.no:443/authority/rest/functions/identifier/autid?id=x90053072&format=json
">x90053072</a>
as one of the creators.</em>
</li>

</ul>


</div>
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion tests/ExampleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ class ExampleTest extends TestCase
public function testBasicExample()
{
$this->visit('/')
->see('Laravel 5');
->see('colligator');
}
}

0 comments on commit 398e016

Please sign in to comment.