title: Call specific method in Class based api view django
body: <p>i am new to DRF, and implemneting class based views and a sample example is this i have tried</p>
  
  <pre><code>@api_view(['GET', 'POST'])
  class ProductList(APIView):
      print "inside"
  
      def get_user_products(self, request, user_id, format=None):
          products = Product.objects.all(user_id=user_id)
          serializer = ProductSerializer(products, many=True)
          return Response(serializer.data)
  
      def get_seller_products(self, request, seller_id, format=None):
          products = Product.objects.filter(seller_id=seller_id)
          serializer = ProductSerializer(products, many=True)
          return Response(serializer.data)
  
      def post(self, request, user_id, seller_id, format=None):
          serializer = ProductSerializer(data=request.DATA, context={'request':request})
          if serializer.is_valid():
              serializer.object.user = User.objects.get(id=user_id)
              serializer.object.seller = Seller.objects.get(id=seller_id)
              serializer.save()
              return Response(serializer.data, status=status.HTTP_201_CREATED)
          return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
  </code></pre>
  
  <p>i this class for my product apis , but i am not sure how can i access individual methods to access the corresponding result, like how can i hit get_user_products or get_seller_products</p>
  
  <p>Right now when i call this api like this <a href="http://localhost:8000/products" rel="nofollow">http://localhost:8000/products</a></p>
  
  <p>as GET method this class executed and it prints "inside" as you can see, but how do i call the methods inside it</p>
  
  <p>Here is the url.py for this app</p>
  
  <pre><code>urlpatterns = [
      url(r'^admin/', include(admin.site.urls)),
      url(r'^', include(router.urls)),
      url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
      url(r'^login$', 'userapp.views.login_user', name="login"),
      url(r'^products$', 'productapp.views.ProductList', name="product-list"),
  ]
  </code></pre>