Sha256: afdca78eb84d80fbc60c96550bca3faa4a07a39b268d509993d0d2e7b2c11f3f

Contents?: true

Size: 1.75 KB

Versions: 45

Compression:

Stored size: 1.75 KB

Contents

<%

api_title = "Positive Case - 2 - should update the profile and save a profile picture"

api_input = <<-eos
Example:

Authorization: Token token="87b01adbba90824b57add8cc06ad8738"
PUT #{request.base_url}/api/v1/update_profile
{
  "name": "Name",
  "gender": "male",
  "date_of_birth": "10/10/1980",
  "email": "name@domain.com",
  "country_id": "1",
  "city_id": "2",
  "image": "<Uploaded File in Binary Format>"
}

It update the user/profile entry in the system and will return its data including the user_id (also called profile_id)
It will also save the profile picture (A user/profile can have only one profile picture at a time and hence it may update the existing one if any)
eos

api_output = <<-eos
{
  "success": true,
  "alert": {
    "heading": "The Profile has been updated successfully",
    "message": "You may access the profile API with API token to get the profile details in future"
  },
  "data": {
    "id": 9,
    "name": "Nayan Tara",
    "gender": "female",
    "date_of_birth": "1984-10-27",
    "username": "d0dca578",
    "email": "nayan.tara@yopmail.com",
    "phone": null,
    "profile_picture":
    { 
      "id": 1,
      "created_at": "22-09-2017 07:32:51",
      "user_id": 1,
      "image_large_path": "/uploads/profile_pictures/1/large_test.jpeg",
      "image_small_path": "/uploads/profile_pictures/1/small_test.jpeg"
    }
  }
}
eos

%>

<%= render partial: "kuppayam/api/docs/example", locals: {
                                        negative_case: false,
                                        example_id: "pos_case_2",
                                        api_title: api_title,
                                        api_input: api_input,
                                        api_output: api_output 
                                      } %>

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
usman-0.4.10.pre.materialize app/views/usman/api/v1/docs/update_profile/_pos_case_2.html.erb
usman-0.4.9.pre.materialize app/views/usman/api/v1/docs/update_profile/_pos_case_2.html.erb
usman-0.4.8.pre.materialize app/views/usman/api/v1/docs/update_profile/_pos_case_2.html.erb
usman-0.4.7.pre.materialize app/views/usman/api/v1/docs/update_profile/_pos_case_2.html.erb
usman-0.4.6.pre.materialize app/views/usman/api/v1/docs/update_profile/_pos_case_2.html.erb
usman-0.4.5.pre.materialize app/views/usman/api/v1/docs/update_profile/_pos_case_2.html.erb
usman-0.4.4.pre.materialize app/views/usman/api/v1/docs/update_profile/_pos_case_2.html.erb
usman-0.4.3.pre.materialize app/views/usman/api/v1/docs/update_profile/_pos_case_2.html.erb
usman-0.4.2.pre.materialize app/views/usman/api/v1/docs/update_profile/_pos_case_2.html.erb
usman-0.4.1.pre.materialize app/views/usman/api/v1/docs/update_profile/_pos_case_2.html.erb
usman-0.4.0.pre.materialize app/views/usman/api/v1/docs/update_profile/_pos_case_2.html.erb
usman-0.3.38 app/views/usman/api/v1/docs/update_profile/_pos_case_2.html.erb
usman-0.3.37 app/views/usman/api/v1/docs/update_profile/_pos_case_2.html.erb
usman-0.3.36 app/views/usman/api/v1/docs/update_profile/_pos_case_2.html.erb
usman-0.3.35 app/views/usman/api/v1/docs/update_profile/_pos_case_2.html.erb
usman-0.3.34 app/views/usman/api/v1/docs/update_profile/_pos_case_2.html.erb
usman-0.3.33 app/views/usman/api/v1/docs/update_profile/_pos_case_2.html.erb
usman-0.3.32 app/views/usman/api/v1/docs/update_profile/_pos_case_2.html.erb
usman-0.3.31 app/views/usman/api/v1/docs/update_profile/_pos_case_2.html.erb
usman-0.3.30 app/views/usman/api/v1/docs/update_profile/_pos_case_2.html.erb