/yasm-api-go

Generated go client for YASM based on yasm-api.

Primary LanguageShell

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.34.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
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 https://yasm.prodyna.com:443/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 /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 MoveCertification Put /certifications/{certificationId}/organizations/{organizationId} Move a Certification to an Organization
CertificationAPI SearchCertifications Post /certifications/search Search over certifications
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 GetCountry Get /countries/{countryId} Get details about a Country
CountryAPI RemoveLanguageFromCountry Delete /countries/{countryId}/languages/{languageId} Assign a language to a country
CountryAPI SearchCountries Post /countries/search Search over countries
CountryAPI UpdateCountry Put /countries/{countryId} Update a Country
CountryAPI UpdateOfficeCountry Put /offices/{officeId}/countries/{countryId} Assign a country to an office
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 GetIndustry Get /industries/{industryId} Get details about an Industry
IndustryAPI SearchIndustries Post /industries/search Search over industries
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 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 SearchLanguages Post /languages/search Search over languages
LanguageAPI UpdatePersonLanguage Put /persons/{personId}/languages/{languageId} Update a language of a person
OfficeAPI AddOrganizationOffice Post /organizations/{organizationId}/offices/{officeId} Assign an office to an organization
OfficeAPI CreateOffice Post /offices Create an Office in an Organization
OfficeAPI DeleteOffice Delete /offices/{officeId} Delete an Office
OfficeAPI DeleteOfficeCountry Delete /offices/{officeId}/countries/{countryId} Delete the office from a Person
OfficeAPI DeleteOrganizationOffice Delete /organizations/{organizationId}/offices/{officeId} Delete an office from an organization
OfficeAPI DeletePersonOffice Delete /persons/{personId}/offices/{officeId} Delete the office from a Person
OfficeAPI GetOfficeDetails Get /offices/{officeId} Get details about an Office
OfficeAPI SearchOffices Post /offices/search Search over offices
OfficeAPI UpdateOffice Put /offices/{officeId} Update an Office
OfficeAPI UpdateOfficeCountry Put /offices/{officeId}/countries/{countryId} Assign a country to an office
OfficeAPI UpdatePersonOffice Put /persons/{personId}/offices/{officeId} Assign a person to an office
OrganizationAPI AddExecutiveOrganizationToProject Post /projects/{projectId}/executive-organizations/{organizationId} Add an Organization to a Project as executive organization
OrganizationAPI AddOrganizationOffice Post /organizations/{organizationId}/offices/{officeId} Assign an office to an organization
OrganizationAPI AddOrganizationToParentOrganization Post /organizations/{organizationId}/parents/{parentOrganizationId} Attach an Organization to a parent Organization, returns the parent Organization
OrganizationAPI AttachOrganizationToIndustry Post /organizations/{organizationId}/industries/{industryId} Add an Organization to an Industry
OrganizationAPI CreateOffice Post /offices Create an Office in an Organization
OrganizationAPI CreateOrganization Post /organizations Create an Organization
OrganizationAPI CreateProject Post /projects Create a Project in an Organization
OrganizationAPI DeleteOrganization Delete /organizations/{organizationId} Delete an organization
OrganizationAPI DeleteOrganizationOffice Delete /organizations/{organizationId}/offices/{officeId} Delete an office from an organization
OrganizationAPI DetachOrganizationFromIndustry Delete /organizations/{organizationId}/industries/{industryId} Remove an Organization to an Industry
OrganizationAPI GetOrganization Get /organizations/{organizationId} Get details about an Organization
OrganizationAPI MoveCertification Put /certifications/{certificationId}/organizations/{organizationId} Move a Certification to an Organization
OrganizationAPI MoveProject Put /projects/{projectId}/organizations/{organizationId} Move a Project to an Organization
OrganizationAPI RemoveExecutiveOrganizationFromProject Delete /projects/{projectId}/executive-organizations/{organizationId} Remove an Organization from a Project as executive organization
OrganizationAPI RemoveOrganizationFromParentOrganization Delete /organizations/{organizationId}/parents/{parentOrganizationId} Detaches an Organization from parent Organization, return the parent Organization
OrganizationAPI RemoveOrganizationServiceManager Delete /organizations/{organizationId}/service-manager/{personId} Remove service manager from an Organization
OrganizationAPI SearchOrganizations Post /organizations/search Search over organizations
OrganizationAPI UpdateOrganization Put /organizations/{organizationId} Update an Organization
OrganizationAPI UpdateOrganizationServiceManager Put /organizations/{organizationId}/service-manager/{personId} Update service manager of an Organization
PDFProfileAPI GeneratePdfProfile Post /pdf-profile Generate a PDF profile from a Person
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 AddPersonProfile Post /persons/{personId}/profiles/{profileId} Add a Profile to a Person
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 AddProjectParticipation Post /project-participations Add Project to a Person
PersonAPI AddSkillConfirmation Post /project-participations/{projectParticipationId}/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 DeleteOfficeCountry Delete /offices/{officeId}/countries/{countryId} Delete the office from a Person
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 DeletePersonPicture Delete /persons/{personId}/picture Delete person image
PersonAPI DeletePersonProfile Delete /persons/{personId}/profiles/{profileId} Remove a Profile from a Person
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 DeleteProjectParticipation Delete /project-participations/{projectParticipationId} Remove an Project from a Person
PersonAPI GeneratePdfProfile Post /pdf-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 ReadPersonPicture Get /persons/{personId}/picture Read person image
PersonAPI ReadPersonProjectParticipation Get /persons/{personId}/project-participation Get a Project Participation of a Person
PersonAPI ReadPersonSkillStatistics Get /persons/{personId}/skill-statistic/{skillId} Show detailed statistics of a skill for a person
PersonAPI ReadProjectParticipation Get /project-participations/{projectParticipationId} Get a project participation
PersonAPI RemoveManager Delete /persons/{personId}/manager Remove a manager from a person
PersonAPI RemoveOrganizationServiceManager Delete /organizations/{organizationId}/service-manager/{personId} Remove service manager from an Organization
PersonAPI RemovePersonLanguage Delete /persons/{personId}/languages/{languageId} Remove a language from a person
PersonAPI RemoveSkillConfirmation Delete /project-participations/{projectParticipationId}/skills/{skillId}/confirmation/{confirmingPersonId} Remove a confirmation
PersonAPI SearchPersons Post /persons/search Search over persons
PersonAPI SearchPersonsStats Post /persons/search/stats Provides search stats (e.g., direct hits) across all persons, ignoring pagination.
PersonAPI SearchProjectParticipations Post /project-participations/search Search over project participations
PersonAPI SetManager Put /persons/{personId}/manager/{managerId} Set a manager for a person
PersonAPI UpdateAvailability Put /persons/{personId}/availabilities/{availabilityId} Update a person availability
PersonAPI UpdateOrganizationServiceManager Put /organizations/{organizationId}/service-manager/{personId} Update service manager of an Organization
PersonAPI UpdatePerson Put /persons/{personId} Update an existing Person
PersonAPI UpdatePersonCertification Put /persons/{personId}/certifications/{certificationId} Update a Certification of a Person
PersonAPI UpdatePersonLanguage Put /persons/{personId}/languages/{languageId} Update a language of a person
PersonAPI UpdatePersonOffice Put /persons/{personId}/offices/{officeId} Assign a person to an office
PersonAPI UpdatePersonPicture Put /persons/{personId}/picture Update person image
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 UpdateProjectParticipation Put /project-participations/{projectParticipationId} Update a Project of a Person
ProfileAPI AddPersonProfile Post /persons/{personId}/profiles/{profileId} Add a Profile to a Person
ProfileAPI CreateProfile Post /profiles Create a new Profile
ProfileAPI DeletePersonProfile Delete /persons/{personId}/profiles/{profileId} Remove a Profile from a Person
ProfileAPI DeleteProfile Delete /profiles/{profileId} Delete a Profile
ProfileAPI GetProfile Get /profiles/{profileId} Get details about a Profile
ProfileAPI SearchProfiles Post /profiles/search Search over profiles
ProfileAPI UpdateProfile Put /profiles/{profileId} Update a Profile
ProjectAPI AddExecutiveOrganizationToProject Post /projects/{projectId}/executive-organizations/{organizationId} Add an Organization to a Project as executive organization
ProjectAPI AddProjectParticipation Post /project-participations Add Project to a Person
ProjectAPI AddSkillConfirmation Post /project-participations/{projectParticipationId}/skills/{skillId}/confirmation/{confirmingPersonId} Confirm Skill
ProjectAPI CreateProject Post /projects Create a Project in an Organization
ProjectAPI DeleteProject Delete /projects/{projectId} Delete a project
ProjectAPI DeleteProjectParticipation Delete /project-participations/{projectParticipationId} Remove an Project from a Person
ProjectAPI GetProject Get /projects/{projectId} Get details about a Project
ProjectAPI MoveProject Put /projects/{projectId}/organizations/{organizationId} Move a Project to an Organization
ProjectAPI ReadProjectParticipation Get /project-participations/{projectParticipationId} Get a project participation
ProjectAPI RemoveExecutiveOrganizationFromProject Delete /projects/{projectId}/executive-organizations/{organizationId} Remove an Organization from a Project as executive organization
ProjectAPI RemoveSkillConfirmation Delete /project-participations/{projectParticipationId}/skills/{skillId}/confirmation/{confirmingPersonId} Remove a confirmation
ProjectAPI SearchProjectParticipations Post /project-participations/search Search over project participations
ProjectAPI SearchProjects Post /projects/search Complex search over project entities
ProjectAPI SearchProjectsStats Post /projects/search/stats Provides search stats (e.g., direct hits) across all projects, ignoring pagination.
ProjectAPI UpdateProject Put /projects/{projectId} Update a Project
ProjectAPI UpdateProjectParticipation Put /project-participations/{projectParticipationId} Update a Project of a Person
ProjectParticipationAPI ReadPersonProjectParticipation Get /persons/{personId}/project-participation Get a Project Participation of a Person
SearchAPI Search Post /search Fulltext search on all kinds of objects
SkillAPI AddPersonInterest Post /persons/{personId}/interests/skills/{skillId} Add an Interest to a Person
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 AddSkillConfirmation Post /project-participations/{projectParticipationId}/skills/{skillId}/confirmation/{confirmingPersonId} Confirm Skill
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 CreateSkill Post /skills Create a Skill
SkillAPI DeletePersonInterest Delete /persons/{personId}/interests/skills/{skillId} Remove an Interest to a Person
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 ReadPersonSkillStatistics Get /persons/{personId}/skill-statistic/{skillId} Show detailed statistics of a skill for a person
SkillAPI RemoveSkillConfirmation Delete /project-participations/{projectParticipationId}/skills/{skillId}/confirmation/{confirmingPersonId} Remove a confirmation
SkillAPI RemoveSkillFromParentSkill Delete /skills/{skillId}/parents/{parentSkillId} Detaches a Skill from parent Skill, return the parent Skill
SkillAPI SearchSkills Post /skills/search Search over skills
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 GetVersion Get /version Information about the server
TemplatesAPI GetTemplates Get /templates list of existing templates

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

oidcScheme

bearerScheme

  • 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