Git Product home page Git Product logo

zendesk-coding-challenge's Introduction

Zendesk Coding Challenge

This is a command line interface application to access tickets on a Zendesk user's account. It is capable of connecting to the Zendesk API and submitting HTTP requests to retrieve single tickets or a page of tickets (using pagination). Details of the response are given to the user - more detail for single-ticket view, and brief details for page view. This program was written in Java.

Prerequisites

  • Maven 3.x (or greater) installed
  • JDK 14 (or greater) installed

How to run

  1. Clone the project into desired directory
> git clone https://github.com/keensworth/zendesk-coding-challenge.git zcc
  1. [IMPORTANT] - Navigate to the following directory and edit the config.properties file to include your Zendesk credentials. This can be done in your file explorer and favored text editor.
...\zcc\src\main\resources\config.properties

It will look like

email=
token=
subdomain=
  1. cd into the cloned directory.
> cd zcc
  1. Build the project with Maven.
> mvn package
  1. cd into the target directory.
> cd target
  1. Run the following jar file.
> java -jar zendesk_coding_challenge-1.0-jar-with-dependencies.jar
  1. Use the program, following the prompts.

Usage

At any point during use, the user will have access to a list of commands they can execute, such as

(t) Fetch ticket by ID
(a) View all available tickets
(q) Quit

The user must simply enter the text within the parentheses for the choice they would like to select, and press enter/return. The only unique case is when you choose to view a ticket. In that case, you will be prompted with

Ticket ID:

and you must enter the ID of the desired ticket.

Images of use are available at the bottom of this README.

Design Choices

Overview

This project was created under a Model View Controller design pattern. This is because the project was relatively interactive, and it helped separate user interaction and console rendering from the API logic.

Model

  • ConsoleManager: Manages overall program state, communicates to the Console and to the API
  • TicketManager: Manages high level calls to the API for ticket retrieval

View

  • Console: Handles all console printing, including prompts, queries, warnings, errors, and ticket/page display

Controller

  • ConsoleController: Handles all user input and manipulates the state of ConsoleManager

API

  • ZendeskAPI: Stores encrypted auth codes and host URL, accepts raw requests to the Zendesk API
  • TicketFetcher: Low-level utility for making ticket-specific calls to the Zendesk API
  • UserFetcher: Low-level utility for making user-specific calls to the Zendesk API (to retrieve names from IDs)

Other Utility

  • JSONParser: Responsible for translating all JSON HTTP responses into Java objects and retrieving specific values

Gallery

Main screen

Main Menu

Single-ticket view

Single Ticket

Ticket-page view

Ticket Page

Example warning message

Warn

Example error message

Error

zendesk-coding-challenge's People

Contributors

keene077 avatar keensworth avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.