services - revaturelabs/ask-frontend GitHub Wiki

QuestionService

Fields

  • questionId

Functions

  • constructor
    • dependency injection (parameter): private http: HttpClient
  • getQuestions
    • no parameters
    • return: Observable<Question[]>
    • GET request
  • setQuestionId
    • parameter: questionId
  • getQuestionId
    • no parameters
  • getQuestionById
    • parameter: questionId
    • return: Observable<Question>
    • GET request
  • getQuestionImages
    • parameter: questionId
    • return: Observable<Image[]>
  • saveQuestion
    • parameter: question
    • return: Observable<Question>
    • POST request
  • updateQuestion
    • parameter: question
    • return: Observable<Question>
    • PUT request
  • highlightResponse
    • parameter: question
    • return: Observable<Question>
    • PATCH request
  • removePost(question): Observable<Question>
    • parameter: question
    • return: Observable<Question>
    • DELETE request

ResponseService

Fields

Functions

  • constructor
    • dependency injection (parameter): private http: HttpClient
  • getResponses
    • no parameters
    • return: Observable<Response[]>
    • GET request
  • getResponseById
    • parameter: responseId
    • return: Observable<Response>
    • GET request
  • saveResponse
    • parameter: response
    • return: Observable<Response>
    • POST request
  • updateResponse
    • parameter: response
    • return: Observable<Response>
    • PUT request
  • removeResponse
    • parameter: response
    • return: Observable<Response>
    • DELETE request

TagsService

Fields

Functions

  • constructor
    • dependency injection (parameter): private http: HttpClient
  • getTags
    • no parameters
    • return: Observable<Tag[]>
    • GET request
  • saveExpertTags
    • parameters: tags, expertId
    • return: Observable
    • PUT request
  • getExpertTags
    • parameter: expertId
    • return: Observable
    • GET request

AuthService

Fields

  • loggedIn: boolean
  • account: Account

Functions

  • constructor
    • dependency injection (parameter): private router: Router
  • isLoggedIn
    • no parameters
    • return: boolean
  • userLogin
    • parameter: account
  • userLogOut
    • no parameters
⚠️ **GitHub.com Fallback** ⚠️