Zoom API is a developer focused module that removes the hassle of figuring out Zoom's authentication requirements for API requests and webhook implementations. Zoom Conference module is the only thing similar but it is very focused on a specific implementation and not super flexible for extending. The zoomapi namespace had a Drupal 7 version. I reached out the maintainer and I was added as maintainer for the 8.x version.

Project link

https://www.drupal.org/project/zoomapi

Git instructions

git clone --branch 8.x-1.x https://git.drupalcode.org/project/zoomapi.git

PAReview checklist

https://pareview.sh/pareview/https-git.drupal.org-project-zoomapi.git-8....

Comments

joelsteidl created an issue. See original summary.

joelsteidl’s picture

Issue summary: View changes
greggles’s picture

From pareview.sh there are a few items to consider fixing. I don't think any of these are blockers to a release, but it would be good to fix them.

The project page and composer.json mention using the key module, but the README doesn't describe any setup steps required in the key module. I guess it needs to be enabled and maybe some configuration done, right? It seems ideal to describe that.

Review of the 8.x-1.x branch (commit f510d5b):

  • Your README.md does not follow best practices (headings need to be uppercase). See https://www.drupal.org/node/2181737 .
    • The INTRODUCTION section is missing.
    • The REQUIREMENTS section is missing.
    • The INSTALLATION section is missing.
    • The CONFIGURATION section is missing.
  • Coder Sniffer has found some issues with your code (please check the Drupal coding standards). See attachment.
  • No automated test cases were found, did you consider writing PHPUnit tests? This is not a requirement but encouraged for professional software development.

This automated report was generated with PAReview.sh, your friendly project application review script.


FILE: ...000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/README.md
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 10 WARNINGS AFFECTING 10 LINES
--------------------------------------------------------------------------
  3 | WARNING | Line exceeds 80 characters; contains 211 characters
  5 | WARNING | Line exceeds 80 characters; contains 157 characters
 11 | WARNING | Line exceeds 80 characters; contains 92 characters
 17 | WARNING | Line exceeds 80 characters; contains 88 characters
 22 | WARNING | Line exceeds 80 characters; contains 107 characters
 28 | WARNING | Line exceeds 80 characters; contains 85 characters
 29 | WARNING | Line exceeds 80 characters; contains 102 characters
 32 | WARNING | Line exceeds 80 characters; contains 104 characters
 33 | WARNING | Line exceeds 80 characters; contains 88 characters
 46 | WARNING | Line exceeds 80 characters; contains 82 characters
--------------------------------------------------------------------------


FILE: ...endor/drupal/pareviewsh/pareview_temp/src/ZoomApiClientInterface.php
--------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 1 LINE
--------------------------------------------------------------------------
 28 | ERROR | [ ] Type hint "array" missing for $query
 28 | ERROR | [ ] Type hint "array" missing for $body
 28 | ERROR | [x] Short array syntax must be used to define arrays
 28 | ERROR | [x] Short array syntax must be used to define arrays
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: .../vendor/drupal/pareviewsh/pareview_temp/src/Client/ZoomApiClient.php
--------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------
  87 | ERROR | [ ] Doc comment short description must start with a
     |       |     capital letter
  87 | ERROR | [x] Doc comment short description must end with a full
     |       |     stop
  89 | ERROR | [x] Short array syntax must be used to define arrays
  89 | ERROR | [x] Short array syntax must be used to define arrays
 118 | ERROR | [ ] Type hint "array" missing for $query
 118 | ERROR | [ ] Type hint "array" missing for $body
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...areviewsh/pareview_temp/src/Controller/ZoomApiWebhooksController.php
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
 137 | ERROR | [x] Data types in @return tags need to be fully namespaced
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...or/drupal/pareviewsh/pareview_temp/src/Event/ZoomApiWebhookEvent.php
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
 43 | ERROR | [x] Data types in @param tags need to be fully namespaced
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...b/vendor/drupal/pareviewsh/pareview_temp/src/Form/ConfigFormBase.php
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
 8 | ERROR | [x] Missing class doc comment
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...1/web/vendor/drupal/pareviewsh/pareview_temp/src/Form/ConfigForm.php
--------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
--------------------------------------------------------------------------
  5 | WARNING | [x] Unused use statement
  8 | ERROR   | [x] Missing class doc comment
 10 | ERROR   | [x] Missing function doc comment
 14 | ERROR   | [x] Missing function doc comment
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------

Time: 1.12 secs; Memory: 4Mb
shaktik’s picture

drupal-check error below.

Shakti-Kumar:d8 shakti.kumar$ ./vendor/bin/drupal-check -ad web/modules/zoomapi/
 8/8 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ -------------------------------------------------------------------------------------------------------------------------
  Line   src/Client/ZoomApiClient.php
 ------ -------------------------------------------------------------------------------------------------------------------------
  31     Property Drupal\zoomapi\Client\ZoomApiClient::$keyRepository has unknown class Drupal\key\KeyRepositoryInterface as its
         type.
  73     Parameter $key_repository of method Drupal\zoomapi\Client\ZoomApiClient::__construct() has invalid typehint type
         Drupal\key\KeyRepositoryInterface.
  80     Property Drupal\zoomapi\Client\ZoomApiClient::$config (Drupal\Core\Config\ConfigFactoryInterface) does not accept
         Drupal\Core\Config\ImmutableConfig.
  103    Method Drupal\zoomapi\Client\ZoomApiClient::request() should return object but returns false.
  143    Call to static method encode() on an unknown class Firebase\JWT\JWT.
  183    Call to method getKey() on an unknown class Drupal\key\KeyRepositoryInterface.
 ------ -------------------------------------------------------------------------------------------------------------------------

 ------ ------------------------------------------------------------------------------------------------------------------------------
  Line   src/Controller/ZoomApiWebhooksController.php
 ------ ------------------------------------------------------------------------------------------------------------------------------
  36     Property Drupal\zoomapi\Controller\ZoomApiWebhooksController::$keyRepository has unknown class
         Drupal\key\KeyRepositoryInterface as its type.
  62     Parameter $key_repository of method Drupal\zoomapi\Controller\ZoomApiWebhooksController::__construct() has invalid typehint
         type Drupal\key\KeyRepositoryInterface.
  64     Access to an undefined property Drupal\zoomapi\Controller\ZoomApiWebhooksController::$requestStack.
  65     Access to an undefined property Drupal\zoomapi\Controller\ZoomApiWebhooksController::$eventDispatcher.
  67     Property Drupal\zoomapi\Controller\ZoomApiWebhooksController::$config (Drupal\Core\Config\ConfigFactoryInterface) does not
         accept Drupal\Core\Config\ImmutableConfig.
  75     Unsafe usage of new static().
         💡 Consider making the class or the constructor final.
  93     PHPDoc tag @param for parameter $request with type Drupal\zoomapi\Controller\Symfony\Component\HttpFoundation\Request is not
         subtype of native type Symfony\Component\HttpFoundation\Request.
  93     Parameter $request of method Drupal\zoomapi\Controller\ZoomApiWebhooksController::capture() has invalid typehint type
         Drupal\zoomapi\Controller\Symfony\Component\HttpFoundation\Request.
  93     Return typehint of method Drupal\zoomapi\Controller\ZoomApiWebhooksController::capture() has invalid type
         Drupal\zoomapi\Controller\Symfony\Component\HttpFoundation\JsonResponse.
  106    Method Drupal\zoomapi\Controller\ZoomApiWebhooksController::capture() should return
         Drupal\zoomapi\Controller\Symfony\Component\HttpFoundation\JsonResponse but returns
         Symfony\Component\HttpFoundation\JsonResponse.
  124    Access to an undefined property Drupal\zoomapi\Controller\ZoomApiWebhooksController::$eventDispatcher.
  131    Method Drupal\zoomapi\Controller\ZoomApiWebhooksController::capture() should return
         Drupal\zoomapi\Controller\Symfony\Component\HttpFoundation\JsonResponse but returns
         Symfony\Component\HttpFoundation\JsonResponse.
  141    Access to an undefined property Drupal\zoomapi\Controller\ZoomApiWebhooksController::$requestStack.
  184    Call to method getKey() on an unknown class Drupal\key\KeyRepositoryInterface.
 ------ ------------------------------------------------------------------------------------------------------------------------------

 ------ -----------------------------------------------------------------------------------------------------------------------------
  Line   src/Event/ZoomApiWebhookEvent.php
 ------ -----------------------------------------------------------------------------------------------------------------------------
  34     Property Drupal\zoomapi\Event\ZoomApiWebhookEvent::$request has unknown class
         Drupal\zoomapi\Event\Symfony\Component\HttpFoundation\Request as its type.
  48     Property Drupal\zoomapi\Event\ZoomApiWebhookEvent::$payload (array) does not accept string.
  49     Property Drupal\zoomapi\Event\ZoomApiWebhookEvent::$request (Drupal\zoomapi\Event\Symfony\Component\HttpFoundation\Request)
         does not accept Symfony\Component\HttpFoundation\Request.
  78     Return typehint of method Drupal\zoomapi\Event\ZoomApiWebhookEvent::getRequest() has invalid type
         Drupal\zoomapi\Event\Symfony\Component\HttpFoundation\Request.
 ------ -----------------------------------------------------------------------------------------------------------------------------


 [ERROR] Found 24 errors
avpaderno’s picture

Status: Needs review » Needs work
avpaderno’s picture

@shaktik The module requires the Key module, as greggles noticed in his comment. The tool you are using doesn't seem is able to load the module dependencies, or it expects you load them before running it.

avpaderno’s picture

Issue summary: View changes
joelsteidl’s picture

Thanks for your time. I learned about some new ways to check my code. :-)

The issues found by PAReview and drupal-check have been addressed.

joelsteidl’s picture

Status: Needs work » Needs review
sharma.amitt16’s picture

@joelsteidl, modules looks great. Well written code and practices followed.

Small suggestions here:


In src/Client/zoomApiClient.php on Line no 164 instead of time() function
 try to use \Drupal::time()->getRequestTime();

Also, the module is compatible with Drupal 9.

~/Sites/d8(8.9.x*) » drupal-check modules/contrib/zoomapi

11/11 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

[OK] No errors

The rest looks good.

joelsteidl’s picture

Thanks @sharma.amitt16

I've also added some automated tests that are passing. https://www.drupal.org/pift-ci-job/1665011

ankush_03’s picture

@joelsteidl,

Please add #10 changes otherwise code looks good to me.

Thanks for your contribution !

ankush_03’s picture

Status: Needs review » Needs work
joelsteidl’s picture

joelsteidl’s picture

Status: Needs work » Needs review
avpaderno’s picture

Assigned: Unassigned » avpaderno

I will review the code in the next 12 hours.

avpaderno’s picture

Status: Needs review » Fixed

Thank you for your contribution! I am going to update your account.

These are some recommended readings to help with excellent maintainership:

You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

I thank all the dedicated reviewers as well.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.