33Quickstart
44==========
55
6- Eager to get started? This page gives a good introduction on how to get started
7- with managing your dyn services with this module. This assumes you already have
8- the dyn module installed. If you do not, head over to the
9- :ref: `Installation <install >` section for information on installing the package.
6+ Eager to get started? This guide will help you get started managing your Dyn
7+ services using this module.
108
11- First, make sure that dyn is :ref: `installed <install >`
9+ If you have not already, :ref: `Install <install >` the Dyn module before proceeding further.
1210
13- Second, it's important to understand that this library handles interacting with
14- both your Traffic Management (TM) and Message Management (MM) services. For both
15- TM and MM you will need to create Session objects which handle interacting with
16- the API, processing API responses, and creating the various objects described
11+ It is also important to understand that this library handles interacting with
12+ both Traffic Management (TM) and Message Management (MM) services. For both
13+ TM and MM, you will need to create Session objects to handle API interactions,
14+ processing API responses, and creating the various objects described
1715in the :ref: `TM <dyn-tm >` and :ref: `MM <dyn-mm >` API documentation sections.
1816
19- So, with that in mind, let's get started with some simple examples .
17+ Here are some simple examples to get you started .
2018
2119Authentication
2220--------------
23- The first step you'll need to take every time you use either of these libraries,
24- is creating an API Session. These session objects are what, internally, manage
25- interacting with the API.
21+ API sessions will need to be created each time you use either of these libraries.
22+ These session objects internally manage interaction with the API.
2623
27- So, to create a TM DynectSession, we begin by importing the tm.session module::
24+ To create a TM DynectSession, begin by importing the tm.session module::
2825
2926 >>> from dyn.tm.session import DynectSession
3027
31- Now we simply create an instance of a DynectSession by using our Dynect
28+ Now create an instance of a DynectSession by using our Dyn
3229login credentials::
33-
30+
3431 >>> my_session = DynectSession(customer, username, password)
3532
36- Now we have a :class: `DynectSession ` object called ``my_session ``. We will be
37- able to use this to access all of the resources that you have access to .
33+ Now you have a :class: `DynectSession ` object called ``my_session ``. You will be
34+ able to use this to access your available resources.
3835
39- Similarly for MM, we import and create an :class: `MMSession ` from the mm.session
36+ For MM, you can import and create an :class: `MMSession ` from the mm.session
4037module::
4138
4239 >>> from dyn.mm.session import MMSession
4340
44- Now we create an instance of that this session by providing it an API Key::
41+ Now create an instance of this session by providing it an API Key::
4542
4643 >>> mm_session = MMSession(my_api_key)
47-
48- This object will now grant us access to the features provided by the Email API.
44+
45+ This object will now grant you access to the features provided by the Email API.
4946
5047Managing Your TM Accounts
5148-------------------------
@@ -65,7 +62,7 @@ your account, such as new :class:`Users` objects::
6562 >>> jsmith.get_permissions_report()
6663 ['ZoneAdd', 'ZoneDelete', 'Login', 'ZoneGet']
6764
68- We can also create new :class: `PermissionGroups ` that can later be applied to
65+ You can also create new :class: `PermissionGroups ` that can later be applied to
6966:class: `User ` objects
7067::
7168
@@ -78,17 +75,17 @@ We can also create new :class:`PermissionGroups` that can later be applied to
7875
7976Using your Zones
8077----------------
81- Using our current session we can create a new zone::
78+ Using your current session you can create a new zone::
8279
8380 >>> from dyn.tm.zones import Zone
8481 >>> my_zone = Zone('mysite.com', '[email protected] ') 8582
86- We can also access our previously created zones::
83+ You can also access your previously created zones::
8784
8885 >>> my_old_zone = Zone('example.com')
8986
90- Using these :class: `Zone ` objects we can then perform any manipulations one
91- might normally perform on a zone. Such as, adding a record::
87+ Using these :class: `Zone ` objects you can begin to manipulate your zones,
88+ such as, adding a record::
9289
9390 >>> a_rec = my_zone.add_record('node', 'A', '127.0.0.1')
9491 >>> a_rec.ip
@@ -100,7 +97,7 @@ might normally perform on a zone. Such as, adding a record::
10097
10198TM Services
10299-----------
103- Now let's try adding a :class: `DynamicDNS ` service to our zone::
100+ Try adding a :class: `DynamicDNS ` service to your zone::
104101
105102 >>> ddns = my_zone.add_service(service_type='DDNS', record_type='A',
106103 ... address='127.0.0.1')
@@ -112,29 +109,29 @@ Now let's try adding a :class:`DynamicDNS` service to our zone::
112109
113110TM Errors and Exceptions
114111------------------------
115- In the event of an authentication problem, dyn.tm will raise a
112+ In the event of an authentication problem, dyn.tm will raise a
116113:class: `~dyn.tm.errors.DynectAuthError ` exception.
117114
118- In the event an error in an API Creation is encountered, dyn.tm will
115+ In the event an error in an API Creation is encountered, dyn.tm will
119116raise a :class: `~dyn.tm.errors.DynectCreateError ` exception with
120117additional information about why the POST failed.
121118
122- In the event an error in an API Update is encountered, dyn.tm will
119+ In the event an error in an API Update is encountered, dyn.tm will
123120raise a :class: `~dyn.tm.errors.DynectUpdateError ` exception with
124121additional information about why the PUT failed.
125122
126- In the event an error in an API Get is encountered, dyn.tm will
123+ In the event an error in an API Get is encountered, dyn.tm will
127124raise a :class: `~dyn.tm.errors.DynectGetError ` exception with
128125additional information about why the GET failed.
129126
130- In the event an error in an API Deletion is encountered, dyn.tm will
127+ In the event an error in an API Deletion is encountered, dyn.tm will
131128raise a :class: `~dyn.tm.errors.DynectDeleteError ` exception with
132129additional information about why the DELETE failed.
133130
134- In the event an error in an API request returns with a status of incomplete (ie
131+ In the event an error in an API request returns with an incomplete status (i.e.
135132the requested job has not yet completed) the wrapper will poll until either the
136- job has copmleted or the polling times out. In such an unlikely event,
137- dyn.tm will raise a :class: `~dyn.tm.errors.DynectQueryTimeout `
133+ job has completed or the polling times out. In such an event,
134+ dyn.tm will raise a :class: `~dyn.tm.errors.DynectQueryTimeout `
138135exception
139136
140137All exceptions that dyn.tm explicitly raises inherit from
@@ -145,18 +142,18 @@ MM Errors and Exceptions
145142In the event that an invalid API Key is provided to your :class: `MMSession ` an
146143:class: `~dyn.mm.errors.EmailKeyError ` exception will be raised.
147144
148- If you were to pass an invalid argument to one of the provided MM objects, a
145+ If you passed an invalid argument to one of the provided MM objects, a
149146:class: `~dyn.mm.errors.DynInvalidArgumentError ` exception is raised.
150147
151148The :class: `~dyn.mm.errors.DynInvalidArgumentError ` should not be confused with
152- the :class: `~dyn.mm.errors.EmailInvalidArgumentError ` that is raised if a
153- required field is not provided. This is an unlikely exception to get raised
154- because the error would likely first be raised as a
149+ the :class: `~dyn.mm.errors.EmailInvalidArgumentError `. The latter is raised if a
150+ required field is not provided. This is an unlikely exception to be raised
151+ as the error would likely be raised as
155152:class: `~dyn.mm.errors.DynInvalidArgumentError `. However, it is still a possible
156- situation .
153+ scenario .
157154
158- Finally, the :class: `~dyn.mm.errors.EmailObjectError ` will be raised if you
159- attempt to create an object that already exists on the Dyn Email System .
155+ The :class: `~dyn.mm.errors.EmailObjectError ` will be raised if you
156+ attempt to create an object that already exists on the Dyn MM system .
160157
161158All MM exceptions inherit from :class: `~dyn.mm.errors.EmailError `
162159
0 commit comments