{"id":18790219,"url":"https://github.com/unistra/gspore","last_synced_at":"2026-01-24T12:10:16.030Z","repository":{"id":16276230,"uuid":"19024602","full_name":"unistra/gspore","owner":"unistra","description":null,"archived":false,"fork":false,"pushed_at":"2016-10-19T09:02:47.000Z","size":22671,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-04-20T15:00:43.646Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Groovy","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unistra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-22T09:46:50.000Z","updated_at":"2016-09-19T14:12:17.000Z","dependencies_parsed_at":"2022-09-14T11:42:17.928Z","dependency_job_id":null,"html_url":"https://github.com/unistra/gspore","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/unistra/gspore","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unistra%2Fgspore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unistra%2Fgspore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unistra%2Fgspore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unistra%2Fgspore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unistra","download_url":"https://codeload.github.com/unistra/gspore/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unistra%2Fgspore/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28727391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T10:24:43.181Z","status":"ssl_error","status_checked_at":"2026-01-24T10:24:36.112Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-07T21:10:35.620Z","updated_at":"2026-01-24T12:10:16.015Z","avatar_url":"https://github.com/unistra.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"gspore\n======\n\n\u003eGspore is intended on being used as a .jar which is \n\u003esufficient to allow java or groovy application that include it to consume SPORE implementing webservices.  \n\n\u003eIt allows the consuming app to instanciate \n\u003espore clients on the basis of api descriptions and to use them.\n\u003eClients are generated with a set of class methods that matches the set of functionalities described in the api description, all of which are indeed callable, and send actual HTTP requests constructed according to the\nspecification.  \n\n\u003eThe raw features of the spore client and it's \n\u003edynamically generated methods can be customized by the middlewares, \n\u003ewhich are specific workflow rewriters that are added on client scope,\n\u003ebut can be enabled in a conditional fashion(e.g add authentication element on client scope).\n\n\u003eThe standard use of gspore should be something like\n\n1. Generate a client through api descritpion\n2. Create and enable, conditionaly or not, Middlewares\n3. Make requests\n\n\u003eTo summarize, the workflow processes through the following steps:\n\n1. feed() function is given the api description, and returns either\nerrors or a Spore.\n2. In the second case, the Spore either returns errors or it adds itself one class method for each method registered in the api description Json under the entry \"methods\".\n3. By that point, basic HTTP request can be issued, and Middlewares can be enabled.\n4. If Middlewares were enabled, the method calls are intercepted and passed through each middleware, in enablement order, being potentially rewritten in the process.\n5. Unless the request was canceled, response structuring elements of the request go through each optional middleware post-processing callback in reverse enablement order.\n6. If no middleware prevented it from doing so, the request is actually sent.\n7. A response is returned to the client.\n\n\nInstall\n-------\n\n* git clone https://github.com/unistra/gspore.git\n* cd gspore\n* mvn install\n\n\nSPORE CLIENT \n------------\n\n###sample groovy syntax :\n\n\u003e*//Create or get client*\n\n\u003e**Spore spore = getClient(\"Client\",\"/pathToMyJson/test.json\")**\n\n\u003e*//Enable Middleware, from hard-coded class or by generating a modified at runtime Middleware*\n\n\u003e**spore.enable(spore.Middleware,[  \n\"processRequest\":{localArgs-\u003e  \nlocalArgs[\"spore.headers\"]=[\"k\":\"v\"]},  payload:[\"entry\":[\"subEntry\":'value']]  \n])**\n\n\u003e*//same thing, with a boolean returning closure to specify wether or not\nthe Middleware should be enabled*\n\n\u003e**spore.enableIf(spore.Middleware,[payload:[\"entry\":[\"subEntry\":'value']]){args-\u003e\n\t\t\targs['name']==\"retrieve_page\"\n\t\t\t }**\n\n\u003e*//call method*\n\n\u003e**spore.methodNameFoundInTheJson([arg1:\"test\",arg2:2,id:\"unid\"])**\n\n###sample java syntax : \n\n\u003e*//Create or get client*\n\n\u003e**Spore spore = getClient(\"Client\",\"/pathToMyJson/test.json\");**\n\t\t\n\u003e*//Instanciate Middleware from hard-coded class*\n\n\u003e**JContentTypeSetter j = new JContentTypeSetter();**\n\n\u003e*//enable Middleware conditionnaly or not*\n\n\u003e**spore.enable(j.getClass(), args);**\n\n\u003e**Map\u003cObject,Object\u003e args0 = new HashMap\u003cObject ,Object\u003e();**\n\n\u003e*//call method*\n\n\u003e**spore.invokeMethod(\"methodNameFoundInTheJson\",args0)**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funistra%2Fgspore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funistra%2Fgspore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funistra%2Fgspore/lists"}