Skip to content
This repository has been archived by the owner on May 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #159 from LaunchCodeEducation/chap20-updates
Browse files Browse the repository at this point in the history
Chapter 20 Updates
  • Loading branch information
gildedgardenia authored Nov 21, 2022
2 parents 5f8a63d + 4828425 commit 7fb1150
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 30 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/appendices/figures/launchpad-view-mac.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 36 additions & 18 deletions src/appendices/postman-install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,51 @@ tool that puts you in full control of configuring and executing API requests.

Installing Postman is easy thanks to its cross-platform nature. You can download the installer on `their downloads page <https://www.postman.com/downloads/>`_.

**Windows Users**: Select the *Windows x64* installer download then run the installer:
Mac Users
---------

.. figure:: figures/download-installer.png
:alt: Close up of webpage to install Postman, user selecting Windows x64 option
1. Select the version that matches the type of chip your Mac has. If you are unsure if you have an Intel chip or the Apple chip, click on the apple in the upper left corner of your screen.
Select *About This Mac*. Under *Processor* on the *Overview* tab, you will see the chip manufaturer.

Windows user should select the *Windows 64-bit* download option
.. figure:: figures/download-installer-mac.png
:alt: Postman installation page with two Mac options displayed

After installation, if Postman does not open automatically, locate the download and open it manually. Making an account can be useful, but if you do not
want to create one, select the link in grey at the bottom of the splash screen that reads: "Skip signing in and take me straight to the to the app":
2. After installation, you can open the app. Postman will first prompt you to make an account, but if you are uncomfortable doing so, at the bottom of the screen is the option to sign up for an account later.

.. figure:: figures/account.png
:alt: Postman splash screen for a new account
The main view of Postman is the launchpad view.

You may skip the step to create an account
.. figure:: figures/launchpad-view-mac.png
:alt: Postman launchpad view for Mac, contains overview of initial actions a user can make with the software

.. admonition:: Tip
You are ready to go!

**Windows Users**: Once installed, you can right-click the Postman icon and pin it to your taskbar for easy access in the future:
Windows Users
-------------

.. figure:: figures/pin-taskbar.png
:alt: User pins the Postman application to their taskbar on Windows
1. Select the *Windows x64* installer download then run the installer:

Pinning the Postman application to your Windows taskbar could make your life easier
.. figure:: figures/download-installer.png
:alt: Close up of webpage to install Postman, user selecting Windows x64 option

You can leave the launchpad view open for now. We will explore Postman after setting up our API server.
Windows user should select the *Windows 64-bit* download option

.. figure:: figures/launchpad-view.png
:alt: Postman launchpad view, contains overview of initial actions a user can make with the software
2. After installation, if Postman does not open automatically, locate the download and open it manually. Making an account can be useful, but if you do not want to create one, select the link in grey at the bottom of the splash screen that reads: "Skip signing in and take me straight to the to the app":

Now that Postman is installed, there are a lot of features of the software to explore
.. figure:: figures/account.png
:alt: Postman splash screen for a new account

.. admonition:: Tip

**Windows Users**: Once installed, you can right-click the Postman icon and pin it to your taskbar for easy access in the future:

.. figure:: figures/pin-taskbar.png
:alt: User pins the Postman application to their taskbar on Windows

Pinning the Postman application to your Windows taskbar could make your life easier

3. You can leave the launchpad view open for now. We will explore Postman after setting up our API server.

.. figure:: figures/launchpad-view.png
:alt: Postman launchpad view, contains overview of initial actions a user can make with the software

Now that Postman is installed, there are a lot of features of the software to explore
4 changes: 1 addition & 3 deletions src/chapters/web-apis/exercises.rst
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,6 @@ If the request fails because of a client error, then it will respond with a ``40

- ``Title``: 10-100 characters
- ``Description``: less than 1000 characters

.. _delete_coding_event:

.. admonition:: Question

Expand All @@ -214,7 +212,7 @@ If the request fails because of a client error, then it will respond with a ``40
#. If the request is successful, what information can we expect to be included in the response?
#. If the request contains an error, what information can we expect to be included in the response?


.. _delete_coding_event:

Delete a Coding Event
~~~~~~~~~~~~~~~~~~~~~
Expand Down
23 changes: 14 additions & 9 deletions src/chapters/web-apis/studio.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,7 @@ Let's change into the repo and switch to this branch:
# check out the 1-sqlite branch
> git checkout 1-sqlite

You can leave this PowerShell window open, we will return to it in a later step:

.. figure:: figures/powershell-in-repo-dir.png
:alt: A PowerShell window in coding-events-api repo directory on 1-sqlite branch

A PowerShell window after cloning the ``coding-events-api`` repo
Keep your terminal open! We have some more work to do.

Start the API Server
^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -93,7 +88,7 @@ Swagger Documentation
^^^^^^^^^^^^^^^^^^^^^

With the application running, go to the first location listed as: "Now listening on:". Enter ``https://localhost:5001`` into your browser. You'll see a page
that looks nothing like any view we created in our CodingEvents MVC applications. This view is indeed not an equivalent. What you see running in the browser is not
that looks nothing like any view we created in our CodingEvents MVC applications. What you see running in the browser is not
at all a client-side application, but rather, some documentation resources for the API itself.

You'll see a list of those endpoints we asked you to describe for this lesson's exercises:
Expand Down Expand Up @@ -127,6 +122,10 @@ To create our first request using Postman, select the *New* button in the top le

Select the *New* button to create a new request

.. admonition:: Note

**Mac Users**: The above screenshot and the screenshots on this page are of the Windows version of Postman. The *New* button on your launchpad is also in the top left corner of the window, but is white.

Creating a New Request
~~~~~~~~~~~~~~~~~~~~~~

Expand All @@ -144,9 +143,15 @@ This will open the new request dialog:

The new request dialog includes fields for a request name, description, and collection

.. admonition:: Note

Depending on the version of Postman you use, when you select the option to make a new request, you may not encounter this dialog.
Instead you are taken directly to a new request form and your request is just labeled "Untitled Request". In the top right corner, you will find a *Save* button with an arrow next to it.
Clicking on the arrow displays a dropdown menu where you can select *Save As* to change the name and save it to a specific collection.

Postman requests require a name and a collection. A collection is just a container to hold related requests. They make it easy to import and export
collections of requests for portability across teams. For our first request, enter "list coding events" in the *Request name* form field. At the
bottom of the new request dialog, you will see that the collections are empty. Select the orange *Create Collection* button, then enter the
bottom of the new request dialog, you will see that the collections are empty. Select the *Create Collection* button, then enter the
name ``coding events API``. The new request dialog button will change to say *Save to coding events API*:

.. figure:: figures/new-request-dialog-complete.png
Expand Down Expand Up @@ -246,7 +251,7 @@ Create a ``CodingEvent``

For our next request, we will create a ``CodingEvent``. Repeat the steps you performed in the previous request:

#. Click on the orange *New* button in the top left corner of the Postman window to create a new request named: ``create coding event``
#. Click on the *New* button in the top left corner of the Postman window to create a new request named: ``create coding event``
#. Add it to the existing ``coding events API`` collection

This request will change the state of the Coding Events collection by adding a new entity to it. Recall that the shorthand for this request is:
Expand Down

0 comments on commit 7fb1150

Please sign in to comment.