Click or drag to resize

AccountKey Class

The shorter of the two API access keys, the account key identifies a unique Degree Days.net API account.
Inheritance Hierarchy
SystemObject
  DegreeDays.ApiAccountKey

Namespace: DegreeDays.Api
Assembly: DegreeDays (in DegreeDays.dll) Version: 1.4
Syntax
public sealed class AccountKey

The AccountKey type exposes the following members.

Constructors
 NameDescription
Public methodAccountKey Constructs an AccountKey object using the specified string account key or throws a FormatException if the string has the wrong format.
Top
Methods
 NameDescription
Public methodEquals An AccountKey object can only be equal to an AccountKey object with an identical canonical string account key.
(Overrides ObjectEquals(Object))
Public methodGetHashCode Overridden to ensure consistency with Equals.
(Overrides ObjectGetHashCode)
Public methodToString Returns the non-null, non-empty, canonical string account key.
(Overrides ObjectToString)
Top
Remarks

Each API account has two access keys: an account key and a security key. The account key identifies the unique Degree Days.net API account. It is a public key in the sense that there is no need to keep it secret.

Here's an example of an account key:

k9vs-e6a3-zh8r

Like the example above, all account keys are made up of three 4-character blocks separated by hyphens, with each non-hyphen character being one of the following:

abcdefghjkmnpqrstuvwxyz23456789

Account keys do not contain upper-case characters or any of the following easily-confused letters and digits: 'i', 'l', 'o', '0' and '1'. The same is true of security keys (the other type of access key). The intention is to make these keys easy for non-technical users to handle (e.g. if entering them into software that you've made for them).

An AccountKey object is a wrapper around a string account key. It is useful for validating account keys from user input, since the constructor will only allow an AccountKey object to be created with a string of the correct format or a string that can be manipulated into the correct format without too much ambiguity.

Thread Safety
Instances of this class are immutable. You can safely reuse them and call them from multiple threads at once.
See Also