live_help Notes

assignment This action requires one of theses roles: Advanced tutor

settings Params

Param name Description
id required . Must be String

The requested id

campus optional , nil allowed . Must be a Hash
campus[name] optional . Must be String

The name. Must be unique.

campus[time_zone] optional , nil allowed . Must be String

The time zone.

campus[language_id] optional . Must be Fixnum

The language id.

campus[slug] optional , nil allowed . Must be String

The slug.

campus[main_email] optional , nil allowed . Must be String

The main email.

campus[endpoint_id] optional , nil allowed . Must be Fixnum

The endpoint id.

campus[vogsphere_id] optional , nil allowed . Must be Fixnum

The vogsphere id.

campus[content_email] optional , nil allowed . Must be String

The content email.

campus[time_of_community_service_started] optional , nil allowed . Must be String

The time of community service started.

campus[companies_mail] optional , nil allowed . Must be String

The companies mail.

campus[address] optional . Must be String

The address.

campus[zip] optional . Must be String

The zip.

campus[city] optional . Must be String

The city.

campus[country] optional . Must be String

The country.

campus[pro_needs_validation] optional , nil allowed . Must be one of: true, false.

Is it pro needs validation ? Default to false.

comments powered by <span class='logo-disqus'>Disqus</span>
PUT /v2/campus/5
{
  "campus": {
    "address": "230 Smith Point",
    "city": "Ritchieville",
    "country": "Bangladesh",
    "language_id": "1",
    "name": "Isle of Man2",
    "zip": "68260-9569"
  }
}
204
curl  -X PUT -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"campus":{"address":"230 Smith Point","city":"Ritchieville","country":"Bangladesh","language_id":"1","name":"Isle of Man2","zip":"68260-9569"}}' "https://api.intra.42.fr/v2/campus/5"
require "oauth2"
UID = "Your application uid"
SECRET = "Your application secret"
client = OAuth2::Client.new(UID, SECRET, site: "https://api.intra.42.fr")
token = client.client_credentials.get_token

params = {campus: {address: "230 Smith Point", city: "Ritchieville", country: "Bangladesh", language_id: "1", name: "Isle of Man2", zip: "68260-9569"}}
response = token.put("/v2/campus/5", params: params)
response.status
# => 204
response.parsed
# =>