{"id":19987635,"url":"https://github.com/raederdev/yoappserver","last_synced_at":"2025-06-25T19:03:48.278Z","repository":{"id":138449642,"uuid":"23759749","full_name":"RaederDev/YoAppServer","owner":"RaederDev","description":"YoAppServer is a simple solution for creating server side applications that interact with the Yo developer API. ","archived":false,"fork":false,"pushed_at":"2014-09-10T19:57:11.000Z","size":3268,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T16:01:46.337Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RaederDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-07T12:51:49.000Z","updated_at":"2014-09-07T22:15:07.000Z","dependencies_parsed_at":"2023-03-22T01:33:01.048Z","dependency_job_id":null,"html_url":"https://github.com/RaederDev/YoAppServer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RaederDev/YoAppServer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaederDev%2FYoAppServer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaederDev%2FYoAppServer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaederDev%2FYoAppServer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaederDev%2FYoAppServer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RaederDev","download_url":"https://codeload.github.com/RaederDev/YoAppServer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaederDev%2FYoAppServer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261937032,"owners_count":23232845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T04:37:34.626Z","updated_at":"2025-06-25T19:03:48.234Z","avatar_url":"https://github.com/RaederDev.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"YoAppServer\n===========\n\nYoAppServer is a simple solution for creating server side applications that interact with the Yo developer API. It is written in Java utilizing many OpenSource technologies. The Server itself is not only a fully functional webserver to handle callbacks but also offers a API to interact with the Yo API servers.\n\nTo get started download the already compiled jar file and the dependencies:\n[https://github.com/DudeNamedBen/YoAppServer/blob/master/YoAppServer.zip][1]\nor compile it from source using maven.\n\n\nOnce you have aquired the jar file put it into the folder where you want to run it from and execute the server using java: \n\n    java -jar YoAppServer.jar\nThe server will generate all needed configuration files and the apps folder. Once you have a working AppServer you can start developing your own apps.\n\nAdd the AppServer as a dependency to your Project and add a file called \"app.json\" in the root package of your project, the AppServer will read this configuration file when enabling your App.\n\n    {\n        \"main\": \"your.package.app.App\",\n        \"name\": \"MyAwesomeYo\",\n        \"url\": \"/relativeCallbackUrl\",\n        \"apiKey\": \"\u003cyourApiKey\u003e\"\n    }\n\n - The main parameter must be the full class name (including package) of the class in your project that extends YoApp.\n - The name parameter is the name of your project.\n - The url parameter is a relative callback url that the app should listen for. For example when you server has the address mydomain.com the appserver would listen on port 4242 (if you haven't changed that in the configuration file) resulting in the base url of: http://mydomain.com:4242/, when you now specify that you app listens for /relativeCallbackUrl your app will be notified when the YoApp server accesses: http://mydomain.com:4242/relativeCallbackUrl. If you specify / as the url, the app will be notified on all valid requests, this can be useful to write for example a statistic app. It is possible to have multiple apps listen for the same url, all apps will be notified.\n - The apiKey parameter should be your API key, if you don't want to specify it in your app configuration you can also override the getApiKey method of YoApp and ommit this entry.\n\nHere you can find an example of what you can do with the API. The App will listen for incoming Yos and will fetch the current subscriber count once a yo is reveived, then it will yo the user back. All Operations are done asynchronously to avoid locking the main thread.\n\n    \n    public class App extends YoApp {\n\n        private final YoCommunicator communicator;\n        \n        public App() {\n            communicator = new YoCommunicator(this);\n        }\n\n        @Override\n        public void onDisable() {\n            System.out.println(\"App disable method called.\");\n        }\n\n        @Override\n        public void onEnable() {\n            System.out.println(\"App enable method called.\");\n        }\n        \n        @Override\n        public void onMessage(String username, String url, String userSuppliedUrl) {\n            if(userSuppliedUrl != null) {\n                System.out.println(\"The user has sent the following Url: \" + userSuppliedUrl);\n            }\n            try {\n                communicator.getSubscriberCount(new SuccessSubscriberCallback() {\n                    @Override\n                    public void run() {\n                        if(getSuccess()) {\n                            System.out.println(\"We have: \" + getSubscribers() + \" Subscribers!\");\n                        } else {\n                            System.out.println(\"We have recveived an error: \" + getError());\n                        }\n                    }\n                });\n                communicator.sendYo(new SuccessCallback() {\n                    @Override\n                    public void run() {\n                        if(getSuccess()) {\n                            System.out.println(\"The User has successfully received the Yo!\");\n                        } else {\n                            System.out.println(\"An Error occured: \" + getError());\n                        }\n                    }\n                }, username);\n            } catch (NoApiKeyException ex) {\n                Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex);\n            }\n        }\n\n    }\n    \n\nOnce you have finished writing your App compile it into a jar file, put it into the \"apps\" folder of your server and start the server. The server will automatically detect and load your app.\n\n[1]: https://github.com/DudeNamedBen/YoAppServer/blob/master/YoAppServer.zip\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraederdev%2Fyoappserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraederdev%2Fyoappserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraederdev%2Fyoappserver/lists"}