-
Notifications
You must be signed in to change notification settings - Fork 1
/
api.py
169 lines (167 loc) · 7.2 KB
/
api.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
from flask import Blueprint
from flask_restful import Api
from resources.Contacts import (
ContactAll,
ContactOne,
ContactAccount,
ContactShort,
ContactFull,
ContactApproveMany
)
from resources.Experience import ExperienceAll, ExperienceOne
from resources.Skills import ContactSkills, ContactSkillOne, AutocompleteSkill
from resources.Capability import (
CapabilityRecommended,
ContactCapabilities,
ContactCapabilitySuggestions,
ContactCapabilitySuggestionOne,
)
from resources.Session import Session
from resources.ProgramApp import (
ContactProgramAppsOne,
ContactProgramAppsAll,
ContactProgramAppsInterested
)
from resources.Opportunity import (
OpportunityAll,
OpportunityAllInternal,
OpportunityOne,
OpportunityOneOrg,
OpportunityDeactivate,
OpportunityActivate,
)
from resources.OpportunityApp import (
OpportunityAppReject,
OpportunityAppAll,
OpportunityAppOne,
OpportunityAppSubmit,
OpportunityAppRecommend,
OpportunityAppReopen,
OpportunityAppInterview,
OpportunityAppConsider,
)
from resources.Profile import ProfileOne, ContactInstructions, ProfileSubmit
from resources.Program import ProgramAll
from resources.Filter import Filter
api_bp = Blueprint('api', __name__)
api = Api(api_bp)
# Route
api.add_resource(ContactAll,
'/contacts/',
'/contacts',
'/')
api.add_resource(ContactOne,
'/contacts/<int:contact_id>',
'/contacts/<int:contact_id>/')
api.add_resource(ContactAccount,
'/contacts/me',
'/contacts/me/')
api.add_resource(ContactShort,
'/contacts/short',
'/contacts/short/',
'/contacts',
'/contacts/')
api.add_resource(ContactApproveMany,
'/contacts/approve',
'/contacts/approve/')
api.add_resource(ContactSkills,
'/contacts/<int:contact_id>/skills',
'/contacts/<int:contact_id>/skills/')
api.add_resource(ContactSkillOne,
'/contacts/<int:contact_id>/skills/<string:skill_id>',
'/contacts/<int:contact_id>/skills/<string:skill_id>/')
api.add_resource(ContactCapabilities,
'/contacts/<int:contact_id>/capabilities/',
'/contacts/<int:contact_id>/capabilities/')
api.add_resource(ContactCapabilitySuggestions,
'/contacts/<int:contact_id>/capabilities/<string:capability_id>/suggestion',
'/contacts/<int:contact_id>/capabilities/<string:capability_id>/suggestion/')
api.add_resource(ContactCapabilitySuggestionOne,
'/contacts/<int:contact_id>/capabilities/<string:capability_id>/suggestion/<string:skill_id>',
'/contacts/<int:contact_id>/capabilities/<string:capability_id>/suggestion/<string:skill_id>/')
api.add_resource(CapabilityRecommended,
'/capabilities',
'/capabilities/')
api.add_resource(AutocompleteSkill,
'/skills/autocomplete',
'/skills/autocomplete/')
api.add_resource(ExperienceAll,
'/contacts/<int:contact_id>/experiences/',
'/contacts/<int:contact_id>/experiences')
api.add_resource(ExperienceOne,
'/experiences/<int:experience_id>',
'/experiences/<int:experience_id>/')
api.add_resource(OpportunityAppOne,
'/contacts/<int:contact_id>/app/<string:opportunity_id>',
'/contacts/<int:contact_id>/app/<string:opportunity_id>/')
api.add_resource(OpportunityAppSubmit,
'/contacts/<int:contact_id>/app/<string:opportunity_id>/submit',
'/contacts/<int:contact_id>/app/<string:opportunity_id>/submit/')
api.add_resource(OpportunityAppReject,
'/contacts/<int:contact_id>/app/<string:opportunity_id>/not-a-fit',
'/contacts/<int:contact_id>/app/<string:opportunity_id>/not-a-fit/')
api.add_resource(OpportunityAppInterview,
'/contacts/<int:contact_id>/app/<string:opportunity_id>/interview',
'/contacts/<int:contact_id>/app/<string:opportunity_id>/interview/')
api.add_resource(OpportunityAppConsider,
'/contacts/<int:contact_id>/app/<string:opportunity_id>/consider',
'/contacts/<int:contact_id>/app/<string:opportunity_id>/consider/')
api.add_resource(OpportunityAppAll,
'/contacts/<int:contact_id>/app',
'/contacts/<int:contact_id>/app/')
api.add_resource(OpportunityAppRecommend,
'/contacts/<int:contact_id>/app/<string:opportunity_id>/recommend',
'/contacts/<int:contact_id>/app/<string:opportunity_id>/recommend/')
api.add_resource(OpportunityAppReopen,
'/contacts/<int:contact_id>/app/<string:opportunity_id>/reopen',
'/contacts/<int:contact_id>/app/<string:opportunity_id>/reopen/')
api.add_resource(Session,
'/session/',
'/session')
api.add_resource(OpportunityAll,
'/opportunity',
'/opportunity/')
api.add_resource(OpportunityAllInternal,
'/internal/opportunities/',
'/internal/opportunities')
api.add_resource(OpportunityOne,
'/opportunity/<string:opportunity_id>',
'/opportunity/<string:opportunity_id>/')
api.add_resource(OpportunityOneOrg,
'/org/opportunities/<string:opportunity_id>',
'/org/opportunities/<string:opportunity_id>/')
api.add_resource(OpportunityDeactivate,
'/opportunity/<string:opportunity_id>/deactivate',
'/opportunity/<string:opportunity_id>/deactivate/')
api.add_resource(OpportunityActivate,
'/opportunity/<string:opportunity_id>/activate',
'/opportunity/<string:opportunity_id>/activate/')
api.add_resource(ProfileOne,
'/contacts/<int:contact_id>/about-me',
'/contacts/<int:contact_id>/about-me/')
api.add_resource(ContactProgramAppsOne,
'/contacts/<int:contact_id>/program-apps',
'/contacts/<int:contact_id>/program-apps/')
api.add_resource(ContactProgramAppsAll,
'/contacts/program-apps',
'/contacts/program-apps/')
api.add_resource(ContactProgramAppsInterested,
'/contacts/<int:contact_id>/program-apps/interested',
'/contacts/<int:contact_id>/program-apps/interested/')
api.add_resource(ContactInstructions,
'/contacts/<int:contact_id>/instructions',
'/contacts/<int:contact_id>/instructions/')
api.add_resource(ProfileSubmit,
'/contacts/<int:contact_id>/submit',
'/contacts/<int:contact_id>/submit/',
'/contacts/<int:contact_id>/profile/submit',
'/contacts/<int:contact_id>/profile/submit/')
api.add_resource(ProgramAll,
'/programs',
'/programs/')
api.add_resource(ContactFull,
'/contacts/<int:contact_id>/profile',
'/contacts/<int:contact_id>/profile/')
api.add_resource(Filter,
'/contacts/filter',
'/contacts/filter/')