User

User Object stores basic information of the User itself, and some settings that closely belongs to the user like Timezone.

User API Methods

Object Representation

The following shows the C# class representation of the UserObject:

    public class UserObject
    {
        public long? Id;
        public string Email;
        public string Password;
        public string FullName;
        public double? TimeZone;
        public bool? IsProUser;
        public long? DefaultProjectId;
        public bool? AddItemMoreExpanded;
        public bool? EditDueDateMoreExpanded;
        public int? ListSortType;
        public int? FirstDayOfWeek;
        public int? NewTaskDueDate;        
    }

The IsProUser field can’t be updated through the API, and only shows a state if the user has Pro Account subscription.
AddItemMoreExpanded, and EditDueDateMoreExpanded are used on the Todo.ly UI, and state whether the User has collapsed, or he is interested in details when adding Items, or Setting Due Dates. For the simplicity of the UI the details are by default hidden when user uses this functions, but they can choose to see the details, and from now on the system remembers that.

ListSortType

The preferred Sort type for all the list in Todo.ly for this User.

public enum ListSortType
{
    Order = 1,
    Priority,
    Duedate        
}

‘Order’ means the user chose to rearrange items and show in that order.

NewTaskDueDate

Represents the number of days the Due Date should be set for all new items the user creates.

Sample HTML representation of the possible values:

<select>
  <option value="-1">None</option>
  <option value="0">Today</option>
  <option value="1">Tomorrow</option>
  <option value="2">2 days</option>
  <option value="3">3 days</option>
  <option value="4">4 days</option>
  <option value="5">5 days</option>
  <option value="6">6 days</option>
  <option value="7">1 week</option>
  <option value="14">2 weeks</option>
  <option value="21">3 weeks</option>
  <option value="30">1 month</option>
</select>
TimeZone

Represents the default TimeZone for the user. It’s used to display due date string, and send notifications at the correct time.

Sample Html representation of the possible values:

<select>
  <option value="-12">(GMT -12:00) Eniwetok, Kwajalein</option>
  <option value="-11">(GMT -11:00) Midway Island, Samoa</option>
  <option value="-10">(GMT -10:00) Hawaii</option>
  <option value="-9">(GMT -9:00) Alaska</option>
  <option value="-8" selected="selected">(GMT -8:00) Pacific Time (US &amp; Canada)</option>
  <option value="-7">(GMT -7:00) Mountain Time (US &amp; Canada)</option>
  <option value="-6">(GMT -6:00) Central Time (US &amp; Canada), Mexico City</option>
  <option value="-5">(GMT -5:00) Eastern Time (US &amp; Canada), Bogota, Lima</option>
  <option value="-4">(GMT -4:00) Atlantic Time (Canada), Caracas, La Paz</option>
  <option value="-3.5">(GMT -3:30) Newfoundland</option>
  <option value="-3">(GMT -3:00) Brazil, Buenos Aires, Georgetown</option>
  <option value="-2">(GMT -2:00) Mid-Atlantic</option>
  <option value="-1">(GMT -1:00) Azores, Cape Verde Islands</option>
  <option value="0">(GMT) Western Europe Time, London, Lisbon, Casablanca</option>
  <option value="1">(GMT +1:00) Brussels, Copenhagen, Madrid, Paris</option>
  <option value="2">(GMT +2:00) Kaliningrad, South Africa</option>
  <option value="3">(GMT +3:00) Baghdad, Riyadh, Moscow, St. Petersburg</option>
  <option value="3.5">(GMT +3:30) Tehran</option>
  <option value="4">(GMT +4:00) Abu Dhabi, Muscat, Baku, Tbilisi</option>
  <option value="4.5">(GMT +4:30) Kabul</option>
  <option value="5">(GMT +5:00) Ekaterinburg, Islamabad, Karachi, Tashkent</option>
  <option value="5.5">(GMT +5:30) Bombay, Calcutta, Madras, New Delhi</option>
  <option value="5.75">(GMT +5:45) Kathmandu</option>
  <option value="6">(GMT +6:00) Almaty, Dhaka, Colombo</option>
  <option value="7">(GMT +7:00) Bangkok, Hanoi, Jakarta</option>
  <option value="8">(GMT +8:00) Beijing, Perth, Singapore, Hong Kong</option>
  <option value="9">(GMT +9:00) Tokyo, Seoul, Osaka, Sapporo, Yakutsk</option>
  <option value="9.5">(GMT +9:30) Adelaide, Darwin</option>
  <option value="10">(GMT +10:00) Eastern Australia, Guam, Vladivostok</option>
  <option value="11">(GMT +11:00) Magadan, Solomon Islands, New Caledonia</option>
  <option value="12">(GMT +12:00) Auckland, Wellington, Fiji, Kamchatka</option>
</select>