mirror of https://github.com/Bunsly/JobSpy
- init
commit
af0d1b634b
|
@ -0,0 +1 @@
|
|||
/.idea
|
|
@ -0,0 +1,5 @@
|
|||
from fastapi import APIRouter
|
||||
from .v1 import router as v1_router
|
||||
|
||||
router = APIRouter(prefix="/api", tags=["api"])
|
||||
router.include_router(v1_router)
|
|
@ -0,0 +1,55 @@
|
|||
from pydantic import BaseModel
|
||||
from datetime import datetime
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class JobType(Enum):
|
||||
FULL_TIME = 'full_time'
|
||||
PART_TIME = 'part_time'
|
||||
CONTRACT = 'contract'
|
||||
INTERNSHIP = 'internship'
|
||||
|
||||
|
||||
class CompensationInterval(Enum):
|
||||
ANNUAL = 'annual'
|
||||
MONTHLY = 'monthly'
|
||||
WEEKLY = 'weekly'
|
||||
DAILY = 'daily'
|
||||
HOURLY = 'hourly'
|
||||
|
||||
|
||||
class Location(BaseModel):
|
||||
country: str
|
||||
city: str
|
||||
state: str
|
||||
postal_code: str = None
|
||||
address: str = None
|
||||
|
||||
|
||||
class Compensation(BaseModel):
|
||||
interval: CompensationInterval
|
||||
min_amount: int
|
||||
max_amount: int
|
||||
currency: str
|
||||
|
||||
|
||||
class DeliveryEnum(Enum):
|
||||
EMAIL = 'email'
|
||||
URL = 'url'
|
||||
|
||||
|
||||
class Delivery(BaseModel):
|
||||
method: DeliveryEnum
|
||||
value: str
|
||||
|
||||
|
||||
class JobPost(BaseModel):
|
||||
title: str
|
||||
description: str
|
||||
company_name: str
|
||||
industry: str
|
||||
location: Location
|
||||
job_type: JobType
|
||||
compensation: Compensation
|
||||
date_posted: datetime
|
||||
delivery: Delivery = None
|
|
@ -0,0 +1,5 @@
|
|||
from fastapi import APIRouter
|
||||
from .jobs import router as jobs_router
|
||||
|
||||
router = APIRouter(prefix="/v1")
|
||||
router.include_router(jobs_router)
|
|
@ -0,0 +1,3 @@
|
|||
from fastapi import APIRouter
|
||||
|
||||
router = APIRouter(prefix="/jobs")
|
Loading…
Reference in New Issue