GithubHelp home page GithubHelp logo

catroweb-api's Introduction

OpenAPIServer

API for the Catrobat Share Platform

This Symfony bundle is automatically generated by the OpenAPI Generator project:

  • API version: v1.4.3
  • Generator version: 7.5.0
  • Build package: org.openapitools.codegen.languages.PhpSymfonyServerCodegen For more information, please visit https://share.catrob.at

Requirements

PHP 8.0 and later

Installation & Usage

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.

Tests

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

Getting Started

Step 1: Please follow the installation procedure first.

Step 2: Enable the bundle in the bundle configuration:

// app/config/bundles.php
return [
    // ...
    OpenAPI\Server\OpenAPIServerBundle::class => ['all' => true],
];

Step 3: Register the routes:

# app/config/routes.yaml
open_api_server:
    resource: "@OpenAPIServerBundle/Resources/config/routing.yaml"

Step 4: Implement the API calls:

<?php
// src/Acme/MyBundle/Api/AuthenticationApi.php

namespace Acme\MyBundle\Api;

use OpenAPI\Server\Api\AuthenticationApiInterface;

class AuthenticationApi implements AuthenticationApiInterface // An interface is autogenerated
{

    /**
     * Implementation of AuthenticationApiInterface#authenticationDelete
     */
    public function authenticationDelete(string $x_refresh, int &$responseCode, array &$responseHeaders): void
    {
        // Implement the operation ...
    }

    // Other operation methods ...
}

Step 5: Tag your API implementation:

# config/services.yaml
services:
    # ...
    Acme\MyBundle\Api\AuthenticationApi:
        tags:
            - { name: "open_api_server.api", api: "authentication" }
    # ...

Now you can start using the bundle!

Documentation for API Endpoints

All URIs are relative to https://share.catrob.at/api

Class Method HTTP request Description
AuthenticationApiInterface authenticationDelete DELETE /authentication Expires refresh token
AuthenticationApiInterface authenticationGet GET /authentication Check token
AuthenticationApiInterface authenticationOauthPost POST /authentication/oauth OAuth Login
AuthenticationApiInterface authenticationPost POST /authentication Login
AuthenticationApiInterface authenticationRefreshPost POST /authentication/refresh Refresh token
AuthenticationApiInterface authenticationUpgradePost POST /authentication/upgrade Upgrade a deprecated token to JWT
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 notificationIdReadPut PUT /notification/{id}/read Mark specified notification as read
NotificationsApiInterface notificationsCountGet GET /notifications/count Count the number of unseen notifications
NotificationsApiInterface notificationsGet GET /notifications Get user notifications -- StatusCode: 501 - Not yet implemented
NotificationsApiInterface notificationsReadPut PUT /notifications/read Mark all notifications as read
ProjectsApiInterface projectIdCatrobatGet GET /project/{id}/catrobat Download the .catrobat (=zip) file of a project
ProjectsApiInterface projectIdDelete DELETE /project/{id} Delete a project
ProjectsApiInterface projectIdGet GET /project/{id} Get the information of a project
ProjectsApiInterface projectIdPut PUT /project/{id} Update details 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 -- StatusCode: 501 - Not yet implemented
ProjectsApiInterface projectsCategoriesGet GET /projects/categories Get default number of projects per category (Most downloaded etc.)
ProjectsApiInterface projectsExtensionsGet GET /projects/extensions Get all possible project extensions. Extensions are automatically added to projects based on their bricks.
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 projectsTagsGet GET /projects/tags Get all possible project tags. Some Tags will only be availabe during events.
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
SearchApiInterface searchGet GET /search Search for projects, users,..
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 userResetPasswordPost POST /user/reset-password Request email to reset password
UserApiInterface usersGet GET /users Get users
UserApiInterface usersSearchGet GET /users/search Search for users
UtilityApiInterface healthGet GET /health Health Check
UtilityApiInterface surveyLangCodeGet GET /survey/{lang_code} Get survey link for given language code.

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

BearerAuth

  • Type: HTTP Bearer Token authentication (JWT)

Author

[email protected]

catroweb-api's People

Contributors

arminpasalic10 avatar bonbuo avatar dependabot[bot] avatar dermaku-dardan avatar dmetzner avatar dmetzner2 avatar hcrane avatar hungryapeman avatar leno12 avatar makne17 avatar marweb1996 avatar mfuerni avatar ndrnour avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

catroweb-api's Issues

privacy policies

move licence routes to this repo

current old routes:

termsOfUse                                                          GET        ANY      ANY    /{flavor}/termsOfUse  
privacypolicy                                                       GET        ANY      ANY    /{flavor}/privacypolicy
licenseToPlay                                                       GET        ANY      ANY    /{flavor}/licenseToPlay

Password reset

/user/reset/<id>

extend user API with password reset route

Notifications

!AUTH by user needed!

/notification/<id> GET & DELETE,
/notifications GET (all &, DELETE (all) but add pagination to GET + DELETE

Additionally PUT, to mark as read?

project Reactions

project reaction must be added to this repo

GET project reactions (count)
POST react to project
PUT (update type needed? or post enough)

project tags/extensions

add tags/extensions to GET /project.... responses

allow to update tags with PUT

GET / tags route to get all tags

Extending Media Section with new routes

The old api has the following endpoints:

api_media_lib                                                       GET        ANY      ANY    /{flavor}/api/media/json
api_media_lib_all_category                                          GET        ANY      ANY    /{flavor}/api/media/category/json
api_media_lib_category                                              GET        ANY      ANY    /{flavor}/api/media/category/{category}/json
api_media_lib_package                                               GET        ANY      ANY    /{flavor}/api/media/package/{package}/json
api_media_lib_package_category                                      GET        ANY      ANY    /{flavor}/api/media/package/{package}/{category}/json
api_media_lib_file                                                  GET        ANY      ANY    /{flavor}/api/media/file/{id}/json
api_media_lib_package_bynameurl                                     ANY        ANY      ANY    /{flavor}/api/media/packageByNameUrl/{package}/json

Which should be translated to the new API.

OAUTH

oauth routes must be moved in this repo

Follower

Design API

  • to get all follower of a user. (Default pagination) (GET)
  • to follow a user (POST)
  • to unfollow (DELETE)

project report

move report route in this repo

add reuquired auth + mass protection

Project GET/DELETE/PUT

extend /project/<id> route

with DELETE to delete your project (auth needed)
with PUT to update your project (descripion, credits, image, privacy,.. ?)

GET already exits, but add the missing projectTypes (if possible):

Similar, Recommended

if new/different parameters would be needed we might need a new route for them. (Research)


  api_recsys_programs                                                 GET        ANY      ANY    /{flavor}/api/projects/recsys.json
  api_recsys_specific_projects                                        GET        ANY      ANY    /{flavor}/api/projects/recsys_specific_projects/{id}.json
  api_recsys_general_projects                                         GET        ANY      ANY    /{flavor}/api/projects/recsys_general_projects.json

project APK

Request APK build

Status APK build

Download APK build

Upload APK (needed by jenkins team)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.