Skip to content

PRODYNA-YASM/yasm-api-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go API client for client

This is an example of using OAuth2 Implicit Flow in a specification to describe security to your API.

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 1.2.1
  • Package version: 0.0.1
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import client "github.com/prodyna-yasm/yasm-api-go"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value sw.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), client.ContextServerIndex, 1)

Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), client.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), client.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), client.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to /api/v1

Class Method HTTP request Description
AvailabilityApi CreateAvailability Post /persons/{personId}/availabilities Create a availability for a person
AvailabilityApi DeleteAvailability Delete /persons/{personId}/availabilities/{availabilityId} Delete a person availability
AvailabilityApi GetAvailabilities Get /persons/{personId}/availabilities Get a list of all activities for a person
AvailabilityApi UpdateAvailability Put /persons/{personId}/availabilities/{availabilityId} Update a person availability
CertificationApi AddPersonCertification Post /persons/{personId}/certifications/{certificationId} Add Certification to a Person
CertificationApi AddSkillToCertification Post /certifications/{certificationId}/skills/{skillId}
CertificationApi CreateCertification Post /organizations/{organizationId}/certifications Create a Certification in an Organization
CertificationApi DeleteCertification Delete /certifications/{certificationId} Delete a Certification
CertificationApi DeletePersonCertification Delete /persons/{personId}/certifications/{certificationId} Remove an Interest to a Person
CertificationApi DeleteSkillFromCertification Delete /certifications/{certificationId}/skills/{skillId}
CertificationApi GetCertification Get /certifications/{certificationId} Get details about a Certification
CertificationApi GetCertifications Get /certifications Get a list of all Certifations indepdenant of the Organization
CertificationApi GetCertificationsForOrganization Get /organizations/{organizationId}/certifications Get a list of all certifications for a organization
CertificationApi MoveCertification Put /organizations/{organizationId}/certificates/{certificateId} Move a Certification to an Organization
CertificationApi UpdateCertification Put /certifications/{certificationId} Update a Certification
CertificationApi UpdatePersonCertification Put /persons/{personId}/certifications/{certificationId} Update a Certification of a Person
CertificationApi UpdateSkillInCertification Put /certifications/{certificationId}/skills/{skillId}
CountryApi AddLanguageToCountry Post /countries/{countryId}/languages/{languageId} Assign a language to a country
CountryApi CreateCountry Post /countries Create a new Country
CountryApi DeleteCountry Delete /countries/{countryId} Delete a Country
CountryApi GetCountries Get /countries Get all Countries
CountryApi GetCountry Get /countries/{countryId} Get details about a Country
CountryApi RemoveLanguageFromCountry Delete /countries/{countryId}/languages/{languageId} Assign a language to a country
CountryApi UpdateCountry Put /countries/{countryId} Update a Country
IndustryApi AttachOrganizationToIndustry Post /organizations/{organizationId}/industries/{industryId} Add an Organization to an Industry
IndustryApi CreateIndustry Post /industries Create an Industry
IndustryApi DeleteIndustry Delete /industries/{industryId} Delete an Industry
IndustryApi DetachOrganizationFromIndustry Delete /organizations/{organizationId}/industries/{industryId} Remove an Organization to an Industry
IndustryApi GetIndustries Get /industries Get all Industries
IndustryApi GetIndustry Get /industries/{industryId} Get details about an Industry
IndustryApi UpdateIndustry Put /industries/{industryId} Update an Industry
LanguageApi AddLanguageToCountry Post /countries/{countryId}/languages/{languageId} Assign a language to a country
LanguageApi AddPersonLanguage Post /persons/{personId}/languages/{languageId} Assign a language to the person
LanguageApi CreateLanguage Post /languages Create a new language
LanguageApi DeleteLanguage Delete /languages/{languageId} Delete a language
LanguageApi GetLanguage Get /languages/{languageId} Get details about a language
LanguageApi GetLanguages Get /languages Get a list of Languages
LanguageApi RemoveLanguageFromCountry Delete /countries/{countryId}/languages/{languageId} Assign a language to a country
LanguageApi RemovePersonLanguage Delete /persons/{personId}/languages/{languageId} Remove a language from a person
LanguageApi UupdatePersonLanguage Put /persons/{personId}/languages/{languageId} Update a language of a person
OfficeApi AddPersonOffice Post /persons/{personId}/offices/{officeId} Assing a person to an office
OfficeApi CreateOffice Post /organizations/{organizationId}/offices Create an Office in an Organization
OfficeApi DeleteOffice Delete /organizations/{organizationId}/offices/{officeId} Delte an Office from an Organization
OfficeApi DeletePersonOffice Delete /persons/{personId}/offices/{officeId} Delete the office from a Person
OfficeApi GetOffice Get /organizations/{organizationId}/offices/{officeId} Get an Office for an Organiaztion
OfficeApi UpdateOffice Put /organizations/{organizationId}/offices/{officeId} Update an Office for an Organization
OrganizationApi AttachOrganizationToIndustry Post /organizations/{organizationId}/industries/{industryId} Add an Organization to an Industry
OrganizationApi CreateCertification Post /organizations/{organizationId}/certifications Create a Certification in an Organization
OrganizationApi CreateOffice Post /organizations/{organizationId}/offices Create an Office in an Organization
OrganizationApi CreateOrganization Post /organizations Create an Organization
OrganizationApi CreateProject Post /organizations/{organizationId}/projects Create a Project in an Organization
OrganizationApi DeleteOffice Delete /organizations/{organizationId}/offices/{officeId} Delte an Office from an Organization
OrganizationApi DeleteOrganization Delete /organizations/{organizationId} Delete an organization
OrganizationApi DetachOrganizationFromIndustry Delete /organizations/{organizationId}/industries/{industryId} Remove an Organization to an Industry
OrganizationApi GetCertificationsForOrganization Get /organizations/{organizationId}/certifications Get a list of all certifications for a organization
OrganizationApi GetOffice Get /organizations/{organizationId}/offices/{officeId} Get an Office for an Organiaztion
OrganizationApi GetOrganization Get /organizations/{organizationId} Get details about an Organization
OrganizationApi GetOrganizationProjects Get /organizations/{organizationId}/projects Get a list of all Projects for an Organization
OrganizationApi GetOrganizations Get /organizations Get a list of all Organizations
OrganizationApi MergeOrganizations Put /organizations/{organizationId}/merge/{otherOrganizationId} Merge two organizations
OrganizationApi MoveCertification Put /organizations/{organizationId}/certificates/{certificateId} Move a Certification to an Organization
OrganizationApi UpdateOffice Put /organizations/{organizationId}/offices/{officeId} Update an Office for an Organization
OrganizationApi UpdateOrganization Put /organizations/{organizationId} Update an Organization
PersonApi AddPersonCertification Post /persons/{personId}/certifications/{certificationId} Add Certification to a Person
PersonApi AddPersonInterest Post /persons/{personId}/interests/skills/{skillId} Add an Interest to a Person
PersonApi AddPersonLanguage Post /persons/{personId}/languages/{languageId} Assign a language to the person
PersonApi AddPersonOffice Post /persons/{personId}/offices/{officeId} Assing a person to an office
PersonApi AddPersonProject Post /persons/{personId}/projects/{projectId} Add Project to a Person
PersonApi AddPersonProjectSkill Post /persons/{personId}/projects/{projectId}/skills/{skillId} Add Skill to a Project participation
PersonApi AddPersonSkillExperience Post /persons/{personId}/experiences/skills/{skillId} Add an Skill experience to a Person
PersonApi AddPersonSkillExperiences Post /persons/{personId}/experiences Add an Skill experience to a Person (bulk)
PersonApi ConfirmSkill Post /persons/{personId}/projects/{projectId}/skills/{skillId}/confirmation/{confirmingPersonId} Confirm Skill
PersonApi CreateAvailability Post /persons/{personId}/availabilities Create a availability for a person
PersonApi CreatePerson Post /persons Create a new Person
PersonApi DeleteAvailability Delete /persons/{personId}/availabilities/{availabilityId} Delete a person availability
PersonApi DeleteConfirmation Delete /persons/{personId}/projects/{projectId}/skills/{skillId}/confirmation/{confirmingPersonId} Remove a confirmation
PersonApi DeletePerson Delete /persons/{personId} Delete an existing Person
PersonApi DeletePersonCertification Delete /persons/{personId}/certifications/{certificationId} Remove an Interest to a Person
PersonApi DeletePersonInterest Delete /persons/{personId}/interests/skills/{skillId} Remove an Interest to a Person
PersonApi DeletePersonOffice Delete /persons/{personId}/offices/{officeId} Delete the office from a Person
PersonApi DeletePersonProject Delete /persons/{personId}/projects/{projectId} Remove an Project from a Person
PersonApi DeletePersonProjectSkill Delete /persons/{personId}/projects/{projectId}/skills/{skillId} Remove a Skill from a Project participation
PersonApi DeletePersonSkillExperience Delete /persons/{personId}/experiences/skills/{skillId} Remove an Skill Experience to a Person
PersonApi DeletePersonSkillExperiences Delete /persons/{personId}/experiences Remove an Skill Experience to a Person
PersonApi GeneratePersonProfile Get /persons/{personid}/profile Generate a PDF profile from a Person
PersonApi GetAvailabilities Get /persons/{personId}/availabilities Get a list of all activities for a person
PersonApi GetPerson Get /persons/{personId} Get basic info about a person
PersonApi ReadPersonProject Get /persons/{personId}/projects/{projectId} Get a Project Partifipation of a Person
PersonApi RemovePersonLanguage Delete /persons/{personId}/languages/{languageId} Remove a language from a person
PersonApi SearchPersons Post /persons/search Complex search over person entities
PersonApi UpdateAvailability Put /persons/{personId}/availabilities/{availabilityId} Update a person availability
PersonApi UpdatePerson Put /persons/{personId} Update an existing Person
PersonApi UpdatePersonCertification Put /persons/{personId}/certifications/{certificationId} Update a Certification of a Person
PersonApi UpdatePersonProject Put /persons/{personId}/projects/{projectId} Update a Project of a Person
PersonApi UpdatePersonProjectSkill Put /persons/{personId}/projects/{projectId}/skills/{skillId} Update the level of a Skill in a Project participation
PersonApi UpdatePersonSkillExperience Put /persons/{personId}/experiences/skills/{skillId} Edit an Skill experience to a Person
PersonApi UpdatePersonSkillExperiences Put /persons/{personId}/experiences Edit an Skill experience to a Person
PersonApi UupdatePersonLanguage Put /persons/{personId}/languages/{languageId} Update a language of a person
ProjectApi AddPersonProject Post /persons/{personId}/projects/{projectId} Add Project to a Person
ProjectApi AddPersonProjectSkill Post /persons/{personId}/projects/{projectId}/skills/{skillId} Add Skill to a Project participation
ProjectApi ConfirmSkill Post /persons/{personId}/projects/{projectId}/skills/{skillId}/confirmation/{confirmingPersonId} Confirm Skill
ProjectApi CreateProject Post /organizations/{organizationId}/projects Create a Project in an Organization
ProjectApi DeleteConfirmation Delete /persons/{personId}/projects/{projectId}/skills/{skillId}/confirmation/{confirmingPersonId} Remove a confirmation
ProjectApi DeletePersonProject Delete /persons/{personId}/projects/{projectId} Remove an Project from a Person
ProjectApi DeletePersonProjectSkill Delete /persons/{personId}/projects/{projectId}/skills/{skillId} Remove a Skill from a Project participation
ProjectApi DeleteProject Delete /projects/{projectId} Delete a project
ProjectApi GetOrganizationProjects Get /organizations/{organizationId}/projects Get a list of all Projects for an Organization
ProjectApi GetProject Get /projects/{projectId} Get details about a Project
ProjectApi MergeProjects Put /projects/{projectId}/merge/{otherProjectId} Merge to projects
ProjectApi ReadPersonProject Get /persons/{personId}/projects/{projectId} Get a Project Partifipation of a Person
ProjectApi SearchProjects Post /projects/search Complex search over project entities
ProjectApi UpdatePersonProject Put /persons/{personId}/projects/{projectId} Update a Project of a Person
ProjectApi UpdatePersonProjectSkill Put /persons/{personId}/projects/{projectId}/skills/{skillId} Update the level of a Skill in a Project participation
ProjectApi UpdateProject Put /projects/{projectId} Update a Project
SearchApi SearchAll Get /search/all/{text} Fulltext search on all kinds of objects
SkillApi AddPersonInterest Post /persons/{personId}/interests/skills/{skillId} Add an Interest to a Person
SkillApi AddPersonProjectSkill Post /persons/{personId}/projects/{projectId}/skills/{skillId} Add Skill to a Project participation
SkillApi AddPersonSkillExperience Post /persons/{personId}/experiences/skills/{skillId} Add an Skill experience to a Person
SkillApi AddPersonSkillExperiences Post /persons/{personId}/experiences Add an Skill experience to a Person (bulk)
SkillApi AddSkillToCertification Post /certifications/{certificationId}/skills/{skillId}
SkillApi AddSkillToParentSkill Post /skills/{skillId}/parents/{parentSkillId} Attach a Skill to a parent Skill, returns the parent Skill
SkillApi ConfirmSkill Post /persons/{personId}/projects/{projectId}/skills/{skillId}/confirmation/{confirmingPersonId} Confirm Skill
SkillApi CreateSkill Post /skills Create a Skill
SkillApi DeleteConfirmation Delete /persons/{personId}/projects/{projectId}/skills/{skillId}/confirmation/{confirmingPersonId} Remove a confirmation
SkillApi DeletePersonInterest Delete /persons/{personId}/interests/skills/{skillId} Remove an Interest to a Person
SkillApi DeletePersonProjectSkill Delete /persons/{personId}/projects/{projectId}/skills/{skillId} Remove a Skill from a Project participation
SkillApi DeletePersonSkillExperience Delete /persons/{personId}/experiences/skills/{skillId} Remove an Skill Experience to a Person
SkillApi DeletePersonSkillExperiences Delete /persons/{personId}/experiences Remove an Skill Experience to a Person
SkillApi DeleteSkill Delete /skills/{skillId} Delete a Skill
SkillApi DeleteSkillFromCertification Delete /certifications/{certificationId}/skills/{skillId}
SkillApi GetSkill Get /skills/{skillId} Get details for a single skill
SkillApi GetSkillParents Get /skills/{skillId}/parents Get ghe list of parents for a skill
SkillApi GetSkills Get /skills Get a list of all skills, optionally only root, optionally only kinds
SkillApi MergeSkills Put /skills/{skillId}/merge/{otherSkillId} Merge two skills
SkillApi RemoveSkillFromParentSkill Delete /skills/{skillId}/parents/{parentSkillId} Detaches a Skill from parent Skill, return the parent Skill
SkillApi UpdatePersonProjectSkill Put /persons/{personId}/projects/{projectId}/skills/{skillId} Update the level of a Skill in a Project participation
SkillApi UpdatePersonSkillExperience Put /persons/{personId}/experiences/skills/{skillId} Edit an Skill experience to a Person
SkillApi UpdatePersonSkillExperiences Put /persons/{personId}/experiences Edit an Skill experience to a Person
SkillApi UpdateSkill Put /skills/{skillId} Update a Skill
SkillApi UpdateSkillInCertification Put /certifications/{certificationId}/skills/{skillId}
StatusApi GetPing Get /ping Server heartbeat operation
StatusApi GetVersion Get /version Information about the server

Documentation For Models

Documentation For Authorization

bearerAuth

  • Type: HTTP Bearer token authentication

Example

auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

Author