Halil Umut Özdemir - bounswe/bounswe2020group7 GitHub Wiki
Who am I?
I am a junior student at Boğaziçi University and my major degree is in Computer Engineering, also I study a minor degree in Electrics and Electronics Engineering. As a student, I am a responsible and hardworking person. I want to work on Robotics in the future. Finally, I like everything about basketball.
Work Experiences
- I worked in IBM as an intern for 20 workdays. During my internship, I do some research and write some scripts to ease some tasks. The scripts that I write can be found on my GitHub repository.
Programming Languages that I have experienced
-
C\C++
-
Python
-
MATLAB
Contact With Me
-
E-mail : [email protected]
Research
Documentation of my Endpoint(Search)
This module makes a search in the registered users of the platform. You can give a search string and filters about the job and field of study of the user that you want to find. Also, a sorting criteria can be given as parameter. It searches and finds a list of users according to your criteria.
Input Format
This endpoint has no POST request. So if you send a post request it will give an error. The output is the following:
{
"detail": "Method \"POST\" not allowed."
}
GET request parameters:
{
token = "Your token will be here!!",
search_string = "The string that you want to search will be here",
filter = {"job" = "job_filter", "field_of_study" = "field_of_study_filter" },
sorting_criteria = "Sorting criteria will be here"
}
token
parameter is explained in the Authentication part.search_string
parameter can be any string that you want to search. To see all of the users give an empty string(like search_string="" not search_string=)
as the value of this parameter. You have to give the search_string parameter.filter
parameter is set of filters in the system.job
can be any job in our system.field_of_study
can be any string.filter
parameter and its subparameters are not obligatory parameters. If you don' give this as a parameter system makes a search without filtering.sorting_criteria
is the sorting criteria of the result list. If any parameter is given the default sorting is made according to the semantic points of the results. name_increasing, name_decreasing, surname_increasing, surname_decreasing can be given as a parameter. It sorts the result list according to the parameter given.
Authentication
This module uses the tokens of the system for authentication. To use this endpoint, firstly register to the system with ../api/register/
endpoint and get a token using ../api/login/
endpoint. And give this token as an input to the request as:
{
token = "Your token will be here!!"
}
Sample Output
Request
Output
[
{
"name": "Test1",
"surname": "Test1",
"e-mail": "[email protected]",
"about_me": "I am a test user and I will be deleted when API is deployed!!",
"job": "Student",
"field_of_study": "Test Field1"
},
{
"name": "Test1",
"surname": "Test1",
"e-mail": "[email protected]",
"about_me": "I am a test user and I will be deleted when API is deployed!!",
"job": "Student",
"field_of_study": "Test Field1"
},
{
"name": "Test1",
"surname": "Test1",
"e-mail": "[email protected]",
"about_me": "I am a test user and I will be deleted when API is deployed!!",
"job": "Student",
"field_of_study": "Test Field1"
},
{
"name": "Test1",
"surname": "Test1",
"e-mail": "[email protected]",
"about_me": "I am a test user and I will be deleted when API is deployed!!",
"job": "Student",
"field_of_study": "Test Field1"
}
]
Error Codes
- Token Error:
GET http://127.0.0.1:8000/api/search/?search_string=trial&filter={"job":"student"}
"You have to give your token" Status Code: 401
- 3rd Party API Error:
GET http://127.0.0.1:8000/api/search/?token=824514797890967718&search_string=trial
"There is a problem about the 3rd party APIs that I used. Please try again!!" , Status Code: 500
- Input Error:
GET http://127.0.0.1:8000/api/search/?token=824514797890967718&search_string=trial&filter={"job":"dent"}
"You give your input in wrong format. Please check the API documentation for the appropriate input format!!" Status Code: 400