承接 davebrend/recruitis-api-project 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

davebrend/recruitis-api-project

最新稳定版本:v1.4.1

Composer 安装命令:

composer require davebrend/recruitis-api-project

包简介

Recruitis API package

README 文档

README

Welcome to the Recruitis API Project! This project is designed as a composer package to be integrated into Symfony projects, providing a robust API client for interacting with the Recruitis platform. Below, you'll find a comprehensive guide on how to set up, use, and extend this package.

Official API Documentation

Table of Contents

Installation

To install the Recruitis API package, use Composer:

composer require davidbrend/recruitis-api-project

This will add the package to your Symfony project and make it available for use.

Configuration

After installation, configure the package by setting the necessary environment variables. These typically include API credentials and endpoint URLs. Add the following to your .env file:

RECRUITIS_API_TOKEN=your_api_token

Definition in services.yaml file:

parameters:
    recruitis-api-token: '%env(RECRUITIS_API_TOKEN)%'

recruitis_api:
    api_token: '%recruitis-api-token%'

Last definition add into bundle.php file:

Davebrend\RecruitisApiProject\RecruitisApiProject::class => ['all' => true]

Usage

Here's a simple example of how to use the Recruitis API client in your Symfony project:

use Davebrend\RecruitisApiProject\Clients\Query;
use Davebrend\RecruitisApiProject\Facades\JobFacade;
use GuzzleHttp\Exception\GuzzleException;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;

class HomepageController extends AbstractController
{
    #[Route('/', 'homepage')]
    public function homepage(JobFacade $jobFacade): Response
    {
        $query = new Query(); // query parameters same as API 
        $jobs = $jobFacade->getJobsByQuery($query);
        return $this->render('default/homepage.html.twig');
    }
}

Directory Structure

The directory structure of the project is as follows:

  • src/
    • Base/: Contains base classes and utilities.
    • Client/: Contains the API client class.
    • Configs/: Configuration classes for setting up the client.
    • DI/: Dependency injection related classes.
    • Dtos/: Data transfer objects for handling API data.
    • Enums/: Enumerations used across the package.
    • Facades/: Facades to simplify interaction with the client.
    • Factories/: Factory classes for initialize .env data to package.
    • Services/: Service classes for handling business logic.
    • RecruitisApiProject.php: Main class for the project.

Testing

This project uses PHPUnit for testing. To run the tests, use the following command:

vendor/bin/phpunit

or

composer run run-tests

The configuration for PHPUnit is provided in phpunit.xml, specifying test directories and coverage settings.

统计信息

  • 总下载量: 17
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-06-16