API for the Catrobat Share Platform
This Symfony bundle is automatically generated by the OpenAPI Generator project:
- API version: v1.0.44
- Build package: org.openapitools.codegen.languages.PhpSymfonyServerCodegen For more information, please visit https://share.catrob.at
PHP 7.1.3 and later
To install the dependencies via Composer, add the following repository to composer.json
of your Symfony project:
{
"repositories": [{
"type": "path",
"url": "//Path to your generated openapi bundle"
}],
}
Then run:
composer require GIT_USER_ID/GIT_REPO_ID:dev-master
to add the generated openapi bundle as a dependency.
To run the unit tests for the generated bundle, first navigate to the directory containing the code, then run the following commands:
composer install
./vendor/bin/phpunit
Step 1: Please follow the installation procedure first.
Step 2: Enable the bundle in the kernel:
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new OpenAPI\Server\OpenAPIServerBundle(),
// ...
);
}
Step 3: Register the routes:
# app/config/routing.yml
open_api_server:
resource: "@OpenAPIServerBundle/Resources/config/routing.yml"
Step 4: Implement the API calls:
<?php
// src/Acme/MyBundle/Api/AuthenticationApiInterface.php
namespace Acme\MyBundle\Api;
use OpenAPI\Server\Api\AuthenticationApiInterface;
class AuthenticationApi implements AuthenticationApiInterface // An interface is autogenerated
{
/**
* Implementation of AuthenticationApiInterface#authenticationGet
*/
public function authenticationGet()
{
// Implement the operation ...
}
// Other operation methods ...
}
Step 5: Tag your API implementation:
# src/Acme/MyBundle/Resources/services.yml
services:
# ...
acme.my_bundle.api.authentication:
class: Acme\MyBundle\Api\AuthenticationApi
tags:
- { name: "open_api_server.api", api: "authentication" }
# ...
Now you can start using the bundle!
All URIs are relative to https://share.catrob.at/api
Class | Method | HTTP request | Description |
---|---|---|---|
AuthenticationApiInterface | authenticationGet | GET /authentication | Check token |
AuthenticationApiInterface | authenticationOauthPost | POST /authentication/oauth | OAuth Login |
AuthenticationApiInterface | authenticationPost | POST /authentication | Login |
MediaLibraryApiInterface | mediaFileIdGet | GET /media/file/{id} | Get the information of a specific media file |
MediaLibraryApiInterface | mediaFilesGet | GET /media/files | Get all content of the media library. |
MediaLibraryApiInterface | mediaFilesSearchGet | GET /media/files/search | Search for mediafiles associated with keywords |
MediaLibraryApiInterface | mediaPackageNameGet | GET /media/package/{name} | Get media-library asstes of a named package |
NotificationsApiInterface | notificationsCountGet | GET /notifications/count | Count the number of unseen notifications |
NotificationsApiInterface | notificationsGet | GET /notifications | Get user notifications |
NotificationsApiInterface | notificationsIdReadPut | PUT /notifications/{id}/read | Mark specified notification as read |
NotificationsApiInterface | notificationsReadPut | PUT /notifications/read | Mark all notifications as read |
ProjectsApiInterface | projectIdGet | GET /project/{id} | Get the information of a project |
ProjectsApiInterface | projectIdRecommendationsGet | GET /project/{id}/recommendations | Get recommended projects related to the specific project |
ProjectsApiInterface | projectIdReportPost | POST /project/{id}/report | Report a project |
ProjectsApiInterface | projectsFeaturedGet | GET /projects/featured | Get the currently featured projects |
ProjectsApiInterface | projectsGet | GET /projects | Get projects |
ProjectsApiInterface | projectsPost | POST /projects | Upload a catrobat project |
ProjectsApiInterface | projectsSearchGet | GET /projects/search | Search for projects associated with a keywords |
ProjectsApiInterface | projectsUserGet | GET /projects/user/ | Get the projects of the logged in user |
ProjectsApiInterface | projectsUserIdGet | GET /projects/user/{id} | Get the public projects of a given user |
UserApiInterface | userDelete | DELETE /user | Delete user account |
UserApiInterface | userGet | GET /user | Get your private user data |
UserApiInterface | userIdGet | GET /user/{id} | Get public user data |
UserApiInterface | userPost | POST /user | Register |
UserApiInterface | userPut | PUT /user | Update User |
UserApiInterface | usersSearchGet | GET /users/search | Search for users |
UtilityApiInterface | healthGet | GET /health | Health Check |
- BaseUser
- BasicUserDataResponse
- DryRun
- ExtendedUserDataResponse
- FeaturedProjectResponse
- JWTResponse
- LoginRequest
- MediaCategoryResponse
- MediaFileResponse
- MediaPackageResponse
- NotificationContent
- NotificationResponse
- NotificationsCountResponse
- NotificationsType
- OAuthLoginRequest
- ProjectReportRequest
- ProjectResponse
- ProjectUploadRequest
- RegisterErrorResponse
- RegisterRequest
- UpdateUserErrorResponse
- UpdateUserRequest
- UpdateUserRequestAllOf
- UploadErrorResponse
- Type: HTTP basic authentication