ianding1 / leetcode.vim

Solve LeetCode problems in Vim!
MIT License
308 stars 43 forks source link

Top Interview Questions Problemset Work Around #58

Open vuciv opened 4 years ago

vuciv commented 4 years ago

I wanted to set my pset to 'top-interview-questions.' This was a little troublesome, so I wanted to show how to do it if anyone is ever curious. Also, I wanted to throw some suggestions out.

I had to inspect the endpoint requests in my browser because g:leetcode_problemset='top-interview-questions' was not working. It turns out that the endpoint is actually 'g:leetcode_problemset=favorite_lists/top-interview-questions'

It would be really helpful if the README and docs had a list of available options.

This alone didn't work, though, because of how the problem object is created. For some reason, the favorite_lists/top-interview-questions endpoint does not contain a reference to 'category.'

For a cheap workaround, I had to go into autoload/leetcode.py and comment out line 223:

#'category': content['category_slug'],

It would be helpful if we can add that key only for psets where we know it is necessary.